@cdkd/cli 0.367.0 → 0.368.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{ambient-client-defaults-BCK5URbU.js → ambient-client-defaults-sDf76v3S.js} +3 -3
  2. package/dist/{ambient-client-defaults-BCK5URbU.js.map → ambient-client-defaults-sDf76v3S.js.map} +1 -1
  3. package/dist/{asg-provider-B3z2ERTV.js → asg-provider-D0P2oc54.js} +6 -6
  4. package/dist/{asg-provider-B3z2ERTV.js.map → asg-provider-D0P2oc54.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-C84Dk_m9.js → custom-resource-runtime-DYjojUID.js} +6 -6
  8. package/dist/{custom-resource-runtime-C84Dk_m9.js.map → custom-resource-runtime-DYjojUID.js.map} +1 -1
  9. package/dist/{db-associated-roles-BPNxy41_.js → db-associated-roles-Dzy8cj2v.js} +2 -2
  10. package/dist/{db-associated-roles-BPNxy41_.js.map → db-associated-roles-Dzy8cj2v.js.map} +1 -1
  11. package/dist/{delete-started-B4voN73N.js → delete-started-CsP3MTbA.js} +10 -6
  12. package/dist/delete-started-CsP3MTbA.js.map +1 -0
  13. package/dist/{deploy-engine-Ckkutmgf.js → deploy-engine-CSe_egmn.js} +898 -66
  14. package/dist/deploy-engine-CSe_egmn.js.map +1 -0
  15. package/dist/{ec2-termination-protection-DWE3uPU3.js → ec2-termination-protection-CmWOst0b.js} +12 -7
  16. package/dist/ec2-termination-protection-CmWOst0b.js.map +1 -0
  17. package/dist/{ecr-uri-7yeldNkK.js → ecr-uri-D60GcgZh.js} +2 -2
  18. package/dist/{ecr-uri-7yeldNkK.js.map → ecr-uri-D60GcgZh.js.map} +1 -1
  19. package/dist/{expected-bucket-owner-CikFL35f.js → expected-bucket-owner-Y8rVebnr.js} +2 -2
  20. package/dist/{expected-bucket-owner-CikFL35f.js.map → expected-bucket-owner-Y8rVebnr.js.map} +1 -1
  21. package/dist/{iam-role-provider-Cya7v6M0.js → iam-role-provider-eIsyKbXN.js} +9 -9
  22. package/dist/{iam-role-provider-Cya7v6M0.js.map → iam-role-provider-eIsyKbXN.js.map} +1 -1
  23. package/dist/{image-plan-BCMBW3N9.js → image-plan-D-tX8hxm.js} +14 -11
  24. package/dist/image-plan-D-tX8hxm.js.map +1 -0
  25. package/dist/index.d.ts +4 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +5 -5
  28. package/dist/{logger-CDeQnUi0.js → logger-c-SNKnID.js} +2 -2
  29. package/dist/{logger-CDeQnUi0.js.map → logger-c-SNKnID.js.map} +1 -1
  30. package/dist/{neptune-provider-DJmwti6E.js → neptune-provider-DjLlFfkQ.js} +7 -7
  31. package/dist/{neptune-provider-DJmwti6E.js.map → neptune-provider-DjLlFfkQ.js.map} +1 -1
  32. package/dist/{program-BqTL728g.js → program-Bq6COj9L.js} +278 -46
  33. package/dist/program-Bq6COj9L.js.map +1 -0
  34. package/dist/{provider-classes-DkZXDD7E.js → provider-classes-BfmqRWw8.js} +626 -148
  35. package/dist/provider-classes-BfmqRWw8.js.map +1 -0
  36. package/dist/{rds-provider-BFrNNNhR.js → rds-provider-DtwBQKQa.js} +10 -10
  37. package/dist/{rds-provider-BFrNNNhR.js.map → rds-provider-DtwBQKQa.js.map} +1 -1
  38. package/dist/{read-replica-Bt5-man4.js → read-replica-wnmC5O6i.js} +3 -3
  39. package/dist/{read-replica-Bt5-man4.js.map → read-replica-wnmC5O6i.js.map} +1 -1
  40. package/dist/{replacement-rules-CLBkCiI5.js → replacement-rules-FVwMQOyO.js} +65 -4
  41. package/dist/replacement-rules-FVwMQOyO.js.map +1 -0
  42. package/dist/{resource-deadline-C2PStI4s.js → resource-deadline-CKhiQ5jv.js} +5 -5
  43. package/dist/{resource-deadline-C2PStI4s.js.map → resource-deadline-CKhiQ5jv.js.map} +1 -1
  44. package/dist/{restore-source-guard-Dl_sbZyl.js → restore-source-guard-B-V5B42P.js} +4 -4
  45. package/dist/{restore-source-guard-Dl_sbZyl.js.map → restore-source-guard-B-V5B42P.js.map} +1 -1
  46. package/dist/{run-cli-CJBGJ3Bv.js → run-cli-DI5DQMk-.js} +2 -2
  47. package/dist/{run-cli-CJBGJ3Bv.js.map → run-cli-DI5DQMk-.js.map} +1 -1
  48. package/dist/{settle-own-write-members-C5Bz98EG.js → settle-own-write-members-X3fAZHTr.js} +19 -12
  49. package/dist/settle-own-write-members-X3fAZHTr.js.map +1 -0
  50. package/dist/{version-D9jxvvqR.js → version-CpD8EJXa.js} +2 -2
  51. package/dist/{version-D9jxvvqR.js.map → version-CpD8EJXa.js.map} +1 -1
  52. package/package.json +3 -2
  53. package/dist/delete-started-B4voN73N.js.map +0 -1
  54. package/dist/deploy-engine-Ckkutmgf.js.map +0 -1
  55. package/dist/ec2-termination-protection-DWE3uPU3.js.map +0 -1
  56. package/dist/image-plan-BCMBW3N9.js.map +0 -1
  57. package/dist/program-BqTL728g.js.map +0 -1
  58. package/dist/provider-classes-DkZXDD7E.js.map +0 -1
  59. package/dist/replacement-rules-CLBkCiI5.js.map +0 -1
  60. package/dist/settle-own-write-members-C5Bz98EG.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-D9jxvvqR.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-BCMBW3N9.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-C2PStI4s.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-CpD8EJXa.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-D-tX8hxm.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-CKhiQ5jv.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-CDeQnUi0.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-BCK5URbU.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-c-SNKnID.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-sDf76v3S.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-C5Bz98EG.js";
9
- import { $a as stateSecretNameNeedles, $c as tryGetTopLevelWriteOnlyProperties, $i as WITHHELD_NAME_DISPLAY, $l as malformedOutputsWarning, $n as journaledOrphanLines, $o as TemplateNoEchoReresolver, $r as PLANNED_EARLY_DELETE_CONSEQUENCE, $u as withStackInstanceIdWithheld, A as recordedProtectionEvidence, Aa as findNestedStackTypeChanges, Ai as attemptUsesCompletedCreate, Al as refuseMalformedResourceEntriesForImportSave, An as macWriteOnlyKeys, Ao as efsPolicyMatchesDeclared, Ar as propertiesChangedReason, As as resolveDynamicReferences, Au as hasNoCloudControlHandlers, Ba as noEchoParameterNamesOf, Bc as isStatefulRecreateTargetSync, Bd as parseBootstrapMarker, Bi as nameGenerationCarriedFrom, Bl as refuseMalformedResourcePropertiesForOrphan, Bo as CC_BROKEN_REASON, Br as siblingRecordedSgRuleIds, Bs as AWS_CREDENTIAL_ENV_KEYS, Bu as splitImportedOps, C as slashedSsmNameHealPendingNote, Ca as supersededHolderOf, Cc as isNamelessDynamicReferenceError, Cd as loadPublishableAssetManifest, Ci as isReplacementOrphan, Cl as malformedResourceEntriesWarning, Cn as refactorMarkerRefusalMessage, Co as withStackRecords, Cr as changedReferencePath, Cu as findHandledUnwrittenCreateOnly, D as findServiceTokenRefusals, Da as snapshotSegmentSurvivors, Dd as AssetManifestLoader, Di as replacementNeverSwapped, Dl as refuseMalformedResourceEntriesForDeploy, Dn as deleteSignalReceiver, Dr as looselyEqual, Ds as poisonRenderedSpellingsCollidingIn, E as deferredServiceTokenWarning, Ec as withSharedDrainBudget, Ed as rewriteTemplateAssetReferences, Ei as recordUnderIdIsNotOwn, El as refuseMalformedResourceEntries, En as updateRefactorMarker, Er as isPairableType, Es as isAlwaysLiveAttribute, F as readProtection, Fa as red, Fc as findReplacedReadersOfRecreateTargets, Fd as ensureAssetStorage, Fl as malformedResourcePropertiesWarning, Fn as resolvePendingCloudControlRequests, Fr as undeclaredGrantSiblingMembers, Fs as assertSendableRoleArn, Ga as maskEventTextWithBoundBags, Gi as retiredNameGenerationsLeaving, Gl as malformedOrphansWarning, Gn as withNestedRevertRun, Go as WaitConditionSignalStore, Gr as sgCidrKey, Gs as classifyReplaySecretRegion, Gu as rebuildClientForBucketRegion, H as readStreamPolicy, Ha as createReadOnlyAttributeHealerFactory, Hd as validateAssetBucketName, Hi as nameScopeOf, Hl as UNREADABLE_ORPHANS_CONTAINER_ROW, Hn as recordDisplacedSkips, Ho as ccBrokenReason, Hs as callerEnvCredentials, Hu as readOnlyStateVersionOf, Ia as yellow, Id as buildDenyExternalAccessPolicy, Ii as segmentCleanupOptions, In as NESTED_PENDING_PARENT_REASON, Ir as recordedRuleIdOf, Is as explicitRoleArnOrThrow, Ja as secretNamePrintingBag, Jc as secretPhysicalIdSegment, Jd as hasOwnKey, Ji as inheritProducerRegions, Jl as repairMalformedOrphansForReadOnly, Jn as withNestedStackContext, Jo as isSignalKey, Jr as canonicalizeIpv4Cidr, Js as isUnexposedRecordedIdentity, Ju as applyCrossPrefixScan, Ka as namingSecretsWithRecordedNoEcho, Kc as displayPhysicalId, Ki as withNameGenerationReached, Kl as refuseMalformedOrphans, Kn as collectNestedChildUnaddressed, Ko as classifyHandleUrl, Kr as sgProtocolKey, Ks as producerRegionsFromState, Ku as CrossPrefixReadError, La as noEchoAttributeNamesOf, Lc as shownType, Ld as assertAssetBucketRegion, Li as removeProtectionTypeList, Ll as refuseMalformedResourcePropertiesForDestroy, Ln as displacedOpClause, Lo as verbatimEchoDriftKeys, Lr as sgRuleOwnershipIdentity, Ls as isIamRoleArn, M as PROTECTION_PROPERTY_BY_TYPE, Ma as cyan, Ml as repairMalformedResourceEntriesForReadOnly, Mo as memberReadFailure, Mr as referencedLogicalIds, Ms as refuseUnreadableCdkCrossAccountRefs, Mt as tagsMatchDeclared, N as isProtectionValueActive, Na as gray, Ni as isRedactedRecordedValue, Nl as unreadableResourceEntries, Nn as formatResourceLine, No as policyDocumentMatchesDeclared, Nr as siblingOwnedRevertDesired, Ns as applyRoleArnIfSet, Nu as providerReplacementOldDeleted, O as serviceTokenBlockingReason, Oa as resolveReplacementOldType, Oc as INTRINSIC_KEYS, Od as getDockerImageBySourceHash, Oi as IMPLICIT_DELETE_DEPENDENCIES, Ol as refuseMalformedResourceEntriesForDestroy, On as isReceiver, Oo as declaredMemberDocument, Or as mappingPairs, Os as stackIdTailOf, Ot as declaredTagsReadback, P as perType, Pa as green, Pd as AssetModeResolver, Pl as malformedDriftResourcePropertiesWarning, Pn as pendingRequestCount, Po as reReadUntilSettled, Pr as stripSiblingOwnedParentMembers, Ps as assertFlagRoleArn, Qa as stackSecretNamesMasker, Qc as getTopLevelKeysHoldingUnreadableCreateOnly, Qi as resourcesNamingDeclaredParameter, Ql as malformedOutputsRefusalMessage, Qn as isHandledOrphan, Qr as DELETED_RESOURCE_REMEDY, Qu as stackInstanceIdOf, Ra as noEchoComparisonForTemplate, Rc as MULTI_REGION_RECREATE_BLOCKED_TYPES, Rd as isCrossRegionRedirect, Ri as removeProtectionTypes, Rl as refuseMalformedResourcePropertiesForDrift, Rn as displacedPhysicalIdShown, Rr as sgSiblingDecidedById, Rs as parseIamRoleArn, Ru as TemplateParser, S as slashedSsmNameHealNote, Sa as supersededHeldByOtherTypeWarning, Sc as carriesFetchableDynamicReference, Si as isJournaledOrphan, Sl as malformedLocalResourcesWarning, Sn as refactorMarkerMovesOf, Sr as changedReferenceInDiff, Ss as isWaitAbandonedError, Su as findActionableSdkUnwired, T as inRunStackKey, Ta as withoutSuperseded, Tc as keepsSecretReferenceToken, Ti as recheckFailedPlan, Tl as refuseMalformedResourceAttributesForOrphan, Tn as sameMove, To as LAMBDA_PERMISSION_STATEMENT_KEYS, Tr as differingRemedy, Ts as isSelectOutOfBounds, Tu as unwrittenCreateOnlyReplacement, Ua as completedReplayEntries, Ud as validateContainerRepoName, Ui as retiredAfterRollback, Ul as hasReadableOrphans, Uo as isCustomResource, Ur as cfnIngressPortValue, Us as envCredentialsAreAssumedRole, Uu as hasReasonlessBaselineRefusal, Va as withAttemptedItemsMasked, Vc as renderStatefulReason, Vd as readBootstrapMarkerBody, Vi as nameGenerationHighWaterOf, Vl as repairMalformedResourcePropertiesForReadOnly, Vn as nestedChildStackName$1, Vo as ProviderRegistry, Vs as applyCallerIdentityCredentials, Wa as journaledOrphanPrintingBag, Wd as BOOTSTRAP_MARKER_PREFIX, Wi as retiredNameGenerationsAfter, Wl as malformedOrphansRefusalMessage, Wn as revertedNestedRowIds, Wo as wouldReturnToSdkProvider, Wr as recordedSgRuleId, Ws as classifyRecordedSecretRegion, Wu as hasUnverifiableParameterRefusal, Xc as withSecretPhysicalIdsMaskedInState, Xd as nullPrototypeRecord, Xi as namesAnyDeclaredParameter, Xl as malformedExportSourceWarning, Xn as dropFailedCommands, Xo as applyCustomResourceResponseExpiration, Xr as replayFailedOperations, Xu as isAccessDenied, Ya as secretNamePrintingBags, Yc as secretSegmentsOfState, Yd as hasPlainPrototype, Yi as computeParameterTaint, Yl as malformedExportNamesWarning, Yn as deleteJournaledOrphans, Yo as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, Yr as canonicalizeIpProtocolValue, Yu as crossPrefixDeniedWarning, Za as secretNamedRecordNeedles, Zc as getSettledWriteOnlyPropertyPaths, Zd as ownValue, Zi as reachableDivergentParameters, Zl as malformedLocalOutputsWarning, Zn as dropFailedHint, Zo as customResourceResponseExpirationWarning, Zr as replayRollback, Zu as isNotImplemented, _ as pendingMovesOutOf, _a as deleteSupersededEntry, _d as buildAssetRedirectMap, _i as withCreateTokenLedger, _l as repairMalformedOrphanRecordsForReadOnly, _r as findRefactorHints, _s as deleteIndeterminateGuards, _u as STATE_RESOURCES_MALFORMED, a as checkNestedSsmNames, aa as carriedExportAliasExposure, ac as isStalePlaceholderArnAttribute, ad as isAbsoluteAssetPath, ai as withUnprovenUnsettled, ao as ccRoutedInstanceTakesNoSnapshot, ar as DeploymentEventsReader, au as refuseDivergentRecordRegionForDestroy, b as healSlashedSsmParameterNames, ba as supersededAfterRollback, bc as getAccountInfo, bi as seedsDeleteFirstGuard, bl as isReadableResourceEntry, bn as readRefactorMarker, br as rollbackOrphanIds, bu as hasReadableOutputs, c as crossStackOutputProvenanceSource, ca as isWholeDynamicReferenceValue, cc as lacksRecordedTableArn, cd as templateIdentity, ci as equalModuloMask, cl as deployRefusesOrphanRowsReason, co as refusesFinalSnapshot, cr as NOECHO_MAC_KEY_ALIAS, cs as localCustomResourceCommand, cu as malformedStateRefusalMessage, d as conditionFingerprint, da as collectPublishedOutputNames, dd as ssmResolvedValueType, di as updatePartialReason, dl as malformedOrphanRecordsWarning, do as buildFinalSnapshotIdentifier, dr as noEchoMacParametersOf, ds as withCustomResourceStack, du as refuseMalformedResourcesForExport, ea as displayTextOrWithheld, ec as coerceParameterTypedValue, ed as isSecretValuedAttribute, ef as describeFileReadFailure, ei as earlyDeleteWhen, eo as storedSecretNameNeedles, er as loadJournaledOrphans, es as readsNoEchoDeleteValues, f as conditionInputsFrom, fa as isExportAliasCollision, fc as keepHeldTokenProvenance, fd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, fi as findUpdatePolicyReplacementRefusals, fl as malformedOrphanRowsKeptWarning, fr as noEchoMacVerdict, fu as refuseMalformedState, g as hasPendingMovesOut, ga as maskingRetryLogger, gc as recordedReferenceRegions, gl as refuseMalformedOrphansForOrphan, gr as formatDestructiveChange, gs as UNSPECIFIED_SKIP_REASON, gu as withheldAccountClause, h as childTemplateLoader, ha as DEFAULT_RESOURCE_WARN_AFTER_MS, hi as ledgerForStack, hl as refuseMalformedOrphanRecordsForDestroy, hr as findDestructiveChanges, hs as RollbackInlinePolicyWriters, hu as accountArgs, i as mergeNoChangeOutputs, ia as secretSafeKeyDisplay, ic as cfnRefValueFromPhysicalId, id as findNestedTemplateTreeDefect, if as resolveAssemblyPath, ii as settleUnsettledPrevious, il as maskedInputProof, io as ccRoutedFinalSnapshotError, ir as planOrphanAdoption, is as NO_LOCAL_CUSTOM_RESOURCES_FLAG, iu as STATE_REGION_DIVERGED, j as recordedProtectionNote, ja as bold, ji as readsRegeneratingSecret, jl as refuseMalformedResourceEntriesForOrphan, jn as readsOnlyNoEchoParameters, jo as lambdaPermissionMatchesDeclared, jr as proposeRenames, js as producerLookupOver, ju as PROPERTY_COVERAGE_BY_TYPE, k as diffSecurity, ka as withPreviousPolicies, ki as computeImplicitDeleteEdges, kl as refuseMalformedResourceEntriesForImport, kn as removeSignalReceiverNamed, ko as declaredPolicyDocument, kr as parseMappingFile, ku as NO_CC_HANDLERS_REASON, l as inheritedProvenanceForChildDiff, la as noEchoParameterValueSeed, li as undeclaredEmptyObservedKeys, ll as isReadableOrphanRecord, lo as unsupportedFinalSnapshotError, lr as createNoEchoValueMacs, lu as refuseMalformedResourcesForDeploy, m as readRecordedConditionVerdicts, ma as DEFAULT_RESOURCE_TIMEOUT_MS, mc as recordedOutputReferenceRegions, md as decodeListingKey, ml as refuseMalformedOrphanRecords, mr as constructPathOf$1, mu as JSON_LISTING_HOLE_VALUE, n as isSecretBearingReferenceString, na as secretBearing, nc as parameterTypeMayLoseSecretIdentity, ni as buildReadCurrentStateContext, no as ATOMIC_FINAL_SNAPSHOT_TYPES, nr as makeForeignHolderScan, nu as refuseMalformedOutputsForDestroy, o as nestedSsmNameDeferredNote, oa as exportNameNoEchoParameters, oc as refStateLookupFromResource, od as listNestedTemplateRows, of as resolveBucketRegion, oi as calculateResourceDrift, ol as declaresNoEcho, oo as effectiveDeletionPolicy, or as DeploymentEventsStore, os as customResourcesFailedWithoutApp, ou as malformedRenderedContainersWarning, p as parentSuppliedValues, pa as bindingSkippedOutputs, pi as replacementCreateRoutesToCloudControl, pl as previewableOrphanRecords, pr as noEchoValueMacsOf, ps as CloudControlProvider, pu as repairMalformedResourcesForReadOnly, q as streamPolicyMatchesDeclared, qa as orphanRecordsPrintingBag, qd as defineOwnKey, ql as refuseMalformedOrphansForDestroy, qn as getCurrentNestedStackContext, qs as regionLessSecretName, qu as CrossPrefixScanCache, r as keptWholeReasonText, ra as secretBearingStateKeyWarning, rc as AWS_NO_VALUE, rf as renderAssemblyPathEscape, ri as recordAfterRollbackUpdate, rl as parameterInputsFor, ro as PRE_DELETE_SNAPSHOT_TYPES, rr as makeSiblingClaimReader, rs as withPrintingSecrets, ru as repairMalformedOutputsForReadOnly, s as nestedSsmNameRowNote, sa as exportNameSecretExposure, sc as lacksRecordedRefArn, sd as renderNestedTemplateTreeDefect, si as equalModuloMarkedMask, sl as maskedPropertyFingerprint, so as isFinalSnapshotError, sr as crossStackReadsForPartialSave, ss as customResourcesRunWithoutApp, su as malformedResourcesWarning, t as DeployEngine, ta as exportAliasCollisionScrubWarning, tc as isUnboundTemplateParameter, td as isSensitiveAttributeName, tf as displayAssemblyPath, ti as earlyDeletedOld, tl as maskedPropertyFingerprintsOf, to as extractDeploymentEventError, tr as sameJournaledOrphans, ts as isCustomResourceType$1, tu as refuseMalformedOutputs, u as makeCanonicalizePropertiesFn, ua as collectDeclaredOutputNames, ui as updatePartialMessage, ul as malformedOrphanRecordsRefusalMessage, uo as createPreDeleteFinalSnapshot, ur as noEchoMacBinding, us as setLocalCustomResourceRuntimeEnabled, uu as refuseMalformedResourcesForDestroy, v as pendingMovesRefusalMessage, va as holdsSupersededResources, vd as createAssetRedirectResolver, vl as unpreviewableOrphanRecords, vn as keptForRetainedRecord, vr as hintSidesOf, vs as deleteLeftInPlace, vu as UNREADABLE_RESOURCES_MAP_ROW, w as scanActiveConsumers, wa as supersededResourcesOf, wc as carriesDynamicReference, wi as planFailedOps, wl as malformedScrubResourceEntriesRefusalMessage, wn as refuseRefactorMarker, wr as changedReferenceReason, ws as IntrinsicFunctionResolver, x as slashedSsmNameHealAdoptedNote, xa as supersededDependentsFirst, xc as isImpossibleEmptyStoredAttribute, xi as demoteSupersededOrphans, xl as malformedLocalResourceEntriesWarning, xn as readRefactorMarkerOnce, xo as revertStackRecordsView, xr as withMovedTo, xs as getReadOnlyPropertyPaths, xu as hasReadableResources, y as refusePendingMovesOut, ya as isSupersededResourceRecord, yc as withoutVersionAttestation, yd as createLazyAssetModeContext, yi as planRollback, yl as unreadableOrphanRecords, yn as recordRetainedForReadoption, yo as destroyStackRecordsView, yr as movedToHint, ys as deleteSkipReason, yu as displayLogicalId, za as noEchoExactEchoLeavesOf, zc as isStatefulRecreateTargetForReplace, zd as getBootstrapMarkerKey, zi as orphanNeedsIdentity, zl as refuseMalformedResourcePropertiesForExport, zn as dropSettledNestedJournals, zs as sendableAssumeRoleCommand, zu as S3StateBackend } from "./deploy-engine-Ckkutmgf.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-X3fAZHTr.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-CSe_egmn.js";
10
10
  import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
11
- import { C as prefetchCreateOnlyPropertyPaths, E as describeTypeWithThrottleRetry, J as parseFailureDebugDetail, K as describeJsonParseFailure, U as renderPhaseTimings, W as timePhase, X as utf8ByteLength, j as withRetry, l as setResolvedResourceTimeouts, w as templateResourceTypes, x as getCreateOnlyPropertyPaths, z as PhaseClock } from "./ec2-termination-protection-DWE3uPU3.js";
12
- import { t as expectedOwnerParam } from "./expected-bucket-owner-CikFL35f.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-B4voN73N.js";
14
- import { An as recordNoEchoAttributeValues, Bt as identityKeyFor, D as recordedNoEchoValuesOf, Fn as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ft as keepTemplateLiteralLeaves, Ln as isSingleDynamicReferenceToken, Lt as spelledKeysOf, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, On as recordMaskOnlyValue, Ot as scrubResourceRecord, Pt as isUncertifiedBaselineMaskPosition, Rt as pathCrossesDottedKey, T as readsNoEchoSource, Tn as provenPublicValue, W as redactForState, Yt as inheritNestedStackParameterAssociations, _t as maskSecretsInText, at as literalSplitDelimitersOf, b as noEchoOutputsComparison, ct as recordLogOnlyParameterValue, dt as shareLogOnlyValues, et as carryLogOnlyValues, f as isMarkedCoordinate, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gt as maskSecretsInError, h as maskWholeValue, it as hasMaskableValues, j as liveMatchesUnresolvedTokenFrame, jn as recordNoEchoParameterFreshValue, k as valueAtCoordinate, kn as recordMaskOnlyValuesIn, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nt as createUnionSecretMasker, ot as logOnlyValueCount, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, sn as physicalNameCopiesOf, st as printingCorpusOf, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, y as noEchoLeavesOf } from "./replacement-rules-CLBkCiI5.js";
15
- import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-Dl_sbZyl.js";
16
- import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-7yeldNkK.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-CmWOst0b.js";
12
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-Y8rVebnr.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-CsP3MTbA.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-FVwMQOyO.js";
15
+ import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-B-V5B42P.js";
16
+ import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-D60GcgZh.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-DkZXDD7E.js");
1592
+ providerClasses ??= import("./provider-classes-BfmqRWw8.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,6 +3362,7 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
3284
3362
  approveDeployment
3285
3363
  },
3286
3364
  ...stackInfo.terminationProtection === true && { terminationProtection: true },
3365
+ ...stackTags !== void 0 && { stackTags },
3287
3366
  inRunStacks: ctx.inRunStacks
3288
3367
  };
3289
3368
  const stackDeployEngine = new DeployEngine(stackStateBackend, stackLockManager, dagBuilder, diffCalculator, stackProviderRegistry, deployEngineOptions, stackRegion, exportIndexStore);
@@ -3413,6 +3492,7 @@ async function deployCommand(stacks, options) {
3413
3492
  const approveDeployment = requireApproval !== "never" && !options.dryRun ? createApprovalPrompter({ yes: options.yes ?? false }) : void 0;
3414
3493
  const resolvedOutputsFile = resolveOutputsFile(options.outputsFile);
3415
3494
  const outputsFile = options.dryRun ? void 0 : resolvedOutputsFile;
3495
+ const stackTagsOverride = resolveStackTagsOverride(options.tags, (line) => logger.warn(line));
3416
3496
  const rawNamedRegion = rawCliRegion(options.region);
3417
3497
  foldRegionOption(options);
3418
3498
  await applyRoleArnIfSet({
@@ -3454,6 +3534,7 @@ async function deployCommand(stacks, options) {
3454
3534
  deployInterrupted = true;
3455
3535
  } });
3456
3536
  process.on("SIGINT", topLevelSigintHandler);
3537
+ process.on("SIGHUP", topLevelSigintHandler.hangup);
3457
3538
  const unforwardSigterm = forwardSigtermToSigint();
3458
3539
  let preflightBackendForCleanup;
3459
3540
  try {
@@ -3656,6 +3737,7 @@ async function deployCommand(stacks, options) {
3656
3737
  exportIndexStore,
3657
3738
  accountId,
3658
3739
  outputsFile,
3740
+ stackTagsOverride,
3659
3741
  stackOutputs,
3660
3742
  addUnaddressed: (stackUnaddressed, crossPrefixKept) => {
3661
3743
  totalUnaddressed += stackUnaddressed;
@@ -3696,6 +3778,7 @@ async function deployCommand(stacks, options) {
3696
3778
  runClock.lap("assets + stacks, summary");
3697
3779
  unforwardSigterm();
3698
3780
  process.removeListener("SIGINT", topLevelSigintHandler);
3781
+ process.removeListener("SIGHUP", topLevelSigintHandler.hangup);
3699
3782
  awsClients.destroy();
3700
3783
  preflightBackendForCleanup?.destroyClient();
3701
3784
  for (const line of renderPhaseTimings()) logger.info(line);
@@ -3715,6 +3798,7 @@ function createDeployCommand() {
3715
3798
  noLocalCustomResourcesOption,
3716
3799
  requireApprovalOption,
3717
3800
  outputsFileOption,
3801
+ stackTagsOption,
3718
3802
  ...contextOptions,
3719
3803
  ...annotationMessageOptions
3720
3804
  ].forEach((opt) => cmd.addOption(opt));
@@ -5918,10 +6002,18 @@ async function computeStackDiff(loadedState, template, region, stackName, stateB
5918
6002
  }
5919
6003
  } };
5920
6004
  }
5921
- const changes = await diffCalculator.calculateDiff(stateForDiff, effectiveTemplate, resolveFn, canonicalizeProperties, void 0, void 0, maskForLog, void 0, maskedInputs, options.refusalRecovery, noEchoComparisonForTemplate(effectiveTemplate, conditions === void 0 ? void 0 : Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name))), mergedParameters, stateForDiff.resources, /* @__PURE__ */ new Set([region, stackName]), inheritedNoEchoParameters), {
6005
+ const changes = await diffCalculator.calculateDiff(stateForDiff, effectiveTemplate, resolveFn, canonicalizeProperties, void 0, void 0, maskForLog, void 0, maskedInputs, options.refusalRecovery, noEchoComparisonForTemplate(effectiveTemplate, namingConditions, mergedParameters, stateForDiff.resources, /* @__PURE__ */ new Set([region, stackName]), inheritedNoEchoParameters), {
5922
6006
  ...options.inheritedReferenceProvenance && { inherited: options.inheritedReferenceProvenance },
5923
6007
  crossStackOutputs: crossStackOutputProvenanceSource(crossStackReads, crossStackReads, stateBackend)
5924
6008
  }, options.forcedNestedChildRuns, options.updatePolicy === true);
6009
+ const childStackTags = await settleStackTagChildRuns({
6010
+ changes,
6011
+ template: effectiveTemplate,
6012
+ stackTags: options.stackTags,
6013
+ state: stateForDiff,
6014
+ resolve: resolveFn,
6015
+ secrets: diffSecrets
6016
+ });
5925
6017
  const macConditions = conditions === void 0 ? void 0 : Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name)));
5926
6018
  const macMoved = await previewNoEchoMacChanges({
5927
6019
  changes,
@@ -6043,6 +6135,7 @@ async function computeStackDiff(loadedState, template, region, stackName, stateB
6043
6135
  }
6044
6136
  return {
6045
6137
  changes: shownChanges,
6138
+ childStackTags,
6046
6139
  securityDiff: () => diffSecurity({
6047
6140
  stackName,
6048
6141
  changes: changes.values(),
@@ -6063,7 +6156,7 @@ async function computeStackDiff(loadedState, template, region, stackName, stateB
6063
6156
  namingSecretsFor: noEchoJudge,
6064
6157
  resolvedParameters: mergedParameters,
6065
6158
  conditions,
6066
- knownConditions: conditions === void 0 ? void 0 : Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name))),
6159
+ knownConditions,
6067
6160
  trust: {
6068
6161
  parameters: trustedParameters,
6069
6162
  conditions: trustedConditions,
@@ -6170,12 +6263,15 @@ function collectCcApiRoutes(template, state, changes, ccRouteUnavailableReason)
6170
6263
  function childRowRunsEngine(row) {
6171
6264
  if (row?.changeType === "CREATE") return true;
6172
6265
  if (row?.changeType === "UPDATE" && row.nestedChildHeal === true) return true;
6266
+ if (row?.changeType === "UPDATE" && row.nestedStackTagsChanged === true) return true;
6173
6267
  return row?.changeType === "UPDATE" && (row.propertyChanges?.length ?? 0) > 0;
6174
6268
  }
6175
6269
  async function buildDiffTree(args) {
6176
- const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, ccRouteUnavailableReason, assetRedirect, cfnFallback, updatePolicy, createRouteOf, producerLookup, crossStackPreview, consumerAccount, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, ssmNameHeal, inheritedSecrets, inheritedDerivedNames, inheritedNoEchoParameters, inheritedNoEchoParametersAnyVerdict, refusalRecovery, inheritedReferenceProvenance, inheritedSecretTokens } = args;
6270
+ const { stackName, displayName, region, template: synthTemplate, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, ccRouteUnavailableReason, assetRedirect, cfnFallback, updatePolicy, createRouteOf, producerLookup, crossStackPreview, consumerAccount, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, ssmNameHeal, inheritedSecrets, inheritedDerivedNames, inheritedNoEchoParameters, inheritedNoEchoParametersAnyVerdict, refusalRecovery, inheritedReferenceProvenance, inheritedSecretTokens, stackTags } = args;
6177
6271
  const unboundHealer = attributeHealerFor?.(stackName, region);
6272
+ const stackTagged = applyStackTagsToTemplate(synthTemplate, stackTags, (line) => logger.warn(line));
6178
6273
  const { state, unreadable, unreadableContainers, deployRefusals, found } = await loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery);
6274
+ const template = await stackTagged;
6179
6275
  const attributeHealer = unboundHealer;
6180
6276
  const createOnlyPrefetch = prefetchCreateOnlyPropertyPaths(templateResourceTypes(recordedTemplateResources(template, state)));
6181
6277
  const secretBearingAbove = parentHasSecretReference === true || templateHasSecretDynamicReference(template);
@@ -6218,6 +6314,7 @@ async function buildDiffTree(args) {
6218
6314
  previewMaskedInputs: !isNestedChild,
6219
6315
  ...ssmNameHeal && { ssmNameHeal },
6220
6316
  ...nestedSsmCheck && { forcedNestedChildRuns: nestedSsmCheck.forcedRows },
6317
+ ...stackTags && { stackTags },
6221
6318
  nestedTemplates
6222
6319
  });
6223
6320
  } finally {
@@ -6324,7 +6421,8 @@ async function buildDiffTree(args) {
6324
6421
  ...childNoEchoParametersAnyVerdict.size > 0 && { inheritedNoEchoParametersAnyVerdict: childNoEchoParametersAnyVerdict },
6325
6422
  ...refusalRecovery && { refusalRecovery },
6326
6423
  ...childReferenceProvenance && { inheritedReferenceProvenance: childReferenceProvenance },
6327
- ...childSecretTokens.size > 0 && { inheritedSecretTokens: childSecretTokens }
6424
+ ...childSecretTokens.size > 0 && { inheritedSecretTokens: childSecretTokens },
6425
+ stackTags: stackDiff.childStackTags?.get(logicalId) ?? childStackTags(stackTags, {})
6328
6426
  });
6329
6427
  node.children.push(await (hasMaskableValues(childDerivedNames) ? withPrintingSecrets(childDerivedNames, buildChild) : buildChild()));
6330
6428
  }
@@ -6429,6 +6527,7 @@ function diffTreeToJson(node) {
6429
6527
  ...change.propertyChanges && change.propertyChanges.length > 0 ? { propertyChanges: change.propertyChanges } : {},
6430
6528
  ...change.attributeChanges && change.attributeChanges.length > 0 ? { attributeChanges: change.attributeChanges } : {},
6431
6529
  ...change.nestedChildHeal === true && { nestedChildHeal: true },
6530
+ ...change.nestedStackTagsChanged === true && { nestedStackTagsChanged: true },
6432
6531
  ...change.providerReplacement !== void 0 && { providerReplacement: change.providerReplacement },
6433
6532
  ...ccApi && ccApi.length > 0 ? { ccApi } : {},
6434
6533
  ...movedTo !== void 0 && { movedTo }
@@ -6555,6 +6654,7 @@ function renderChangeLines(changes, logFn, ccApiRoutes, adoptedOrphans, refactor
6555
6654
  logFn(` new: ${attrChange.newValue ?? "(unset)"}`);
6556
6655
  }
6557
6656
  if (change.nestedChildHeal === true) logFn(" - [nested stack deployed to re-spell an SSM parameter name; go-to-k/cdkd#6282]");
6657
+ if (change.nestedStackTagsChanged === true) logFn(" - [nested stack deployed to apply its changed stack tags]");
6558
6658
  break;
6559
6659
  case "DELETE":
6560
6660
  deleteCount++;
@@ -6694,6 +6794,7 @@ async function diffCommand(stacks, options) {
6694
6794
  if (securityOnly && options.json === true) throw new CdkdError("--security-only cannot be used with --json: it prints the security tables only", "INCOMPATIBLE_OPTIONS");
6695
6795
  const providerClasses = await loadProviderClasses();
6696
6796
  const logger = getLogger();
6797
+ const stackTagsOverride = resolveStackTagsOverride(options.tags, (line) => logger.warn(line));
6697
6798
  if (options.json) logger.setLevel("warn");
6698
6799
  else if (options.verbose) logger.setLevel("debug");
6699
6800
  foldRegionOption(options);
@@ -6862,11 +6963,13 @@ async function diffCommand(stacks, options) {
6862
6963
  const rewritten = rewriteTemplateAssetReferences(stackInfo.template, assetRedirect);
6863
6964
  logger.debug(`Rewrote ${rewritten} asset reference(s) to cdkd asset storage in template of stack ${stackInfo.stackName}`);
6864
6965
  }
6966
+ const stackTags = stackTagsOverride ?? stackInfo.tags;
6865
6967
  trees.push(await buildDiffTree({
6866
6968
  stackName: stackInfo.stackName,
6867
6969
  displayName: shownName,
6868
6970
  region: stackRegion,
6869
6971
  template: stackInfo.template,
6972
+ ...stackTags !== void 0 && { stackTags },
6870
6973
  nestedTemplates: stackInfo.nestedTemplates ?? nullPrototypeRecord(),
6871
6974
  recursive,
6872
6975
  stateBackend,
@@ -6971,6 +7074,7 @@ function createDiffCommand() {
6971
7074
  ...stackOptions,
6972
7075
  ...contextOptions
6973
7076
  ].forEach((opt) => cmd.addOption(opt));
7077
+ cmd.addOption(stackTagsOption);
6974
7078
  cmd.addOption(regionOption);
6975
7079
  return cmd;
6976
7080
  }
@@ -19890,15 +19994,24 @@ async function collectImportFailureSummary(cfnClient, stackName) {
19890
19994
  if (failures.length === 0) return "";
19891
19995
  return failures.map((f) => ` - ${rowIdent(f.logicalId)} (${rowIdent(f.type)}): ${displayAwsMessage(f.reason)}`).join("\n");
19892
19996
  }
19893
- 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) {
19894
20010
  await cfnClient.send(new UpdateStackCommand({
19895
20011
  StackName: cfnStackName,
19896
20012
  UsePreviousTemplate: true,
19897
20013
  ...parameters.length > 0 && { Parameters: parameters },
19898
- Tags: [{
19899
- Key: "cdkd:nested-export-flip",
19900
- Value: `${(/* @__PURE__ */ new Date()).toISOString()}-${randomUUID().slice(0, 8)}`
19901
- }],
20014
+ Tags: tags,
19902
20015
  Capabilities: [
19903
20016
  "CAPABILITY_IAM",
19904
20017
  "CAPABILITY_NAMED_IAM",
@@ -19912,6 +20025,16 @@ async function flipStackToUpdateComplete(cfnClient, cfnStackName, parameters) {
19912
20025
  maxDelay: 10
19913
20026
  }, { StackName: cfnStackName });
19914
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
+ }
19915
20038
  async function fetchCfnStackTemplate(cfnClient, cfnStackName) {
19916
20039
  const resp = await cfnClient.send(new GetTemplateCommand({
19917
20040
  StackName: cfnStackName,
@@ -20001,11 +20124,12 @@ async function removeExportedStackRecord(stateBackend, stackName, region, logger
20001
20124
  await releaseRegistryMarkerQuietly(stateBackend, stackName, region, logger);
20002
20125
  }
20003
20126
  async function runPerStackImportPhases(ctx) {
20004
- 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;
20005
20128
  for (let i = 0; i < perStackPlans.length; i++) {
20006
20129
  const plan = perStackPlans[i];
20007
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)`);
20008
20131
  const stackParameters = paramsByCdkdName.get(plan.cdkdName) ?? [];
20132
+ const stackTags = stackTagsByCdkdName.get(plan.cdkdName) ?? {};
20009
20133
  const afterImport = async (what, stage, step) => {
20010
20134
  try {
20011
20135
  return await step();
@@ -20041,7 +20165,7 @@ async function runPerStackImportPhases(ctx) {
20041
20165
  logger.info(` ✓ Phase 1A: CFn stack ${quotedOrNotShown(plan.cfnName)} created via IMPORT (${plan.phase1Imports.length} leaf resource(s)).`);
20042
20166
  if (plan.cdkdName !== rootStackName) {
20043
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...`);
20044
- 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));
20045
20169
  }
20046
20170
  const rewrittenNestedRows = /* @__PURE__ */ new Map();
20047
20171
  if (plan.nestedStackRows.length > 0) {
@@ -20083,7 +20207,7 @@ async function runPerStackImportPhases(ctx) {
20083
20207
  logger.info(` ✓ Phase 1B: parent ${quotedOrNotShown(plan.cfnName)} adopted ${plan.nestedStackRows.length} nested child(ren) via UPDATE-IMPORT.`);
20084
20208
  if (plan.cdkdName !== rootStackName) {
20085
20209
  logger.info(` Flipping ${quotedOrNotShown(plan.cfnName)} back to UPDATE_COMPLETE so its own parent's Phase 1B can adopt it...`);
20086
- 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));
20087
20211
  }
20088
20212
  }
20089
20213
  if (plan.recreateBeforePhase2.length > 0) for (const entry of plan.recreateBeforePhase2) {
@@ -20113,6 +20237,7 @@ async function runPerStackImportPhases(ctx) {
20113
20237
  }
20114
20238
  logger.info(` ✓ Phase 2: stack ${quotedOrNotShown(plan.cfnName)} updated (${plan.phase2Creates.length} non-importable CREATE, ${plan.recreateBeforePhase2.length} re-CREATE).`);
20115
20239
  }
20240
+ if (plan.cdkdName === rootStackName) await applyExportedStackTags(deps.cfnClient, plan.cfnName, stackParameters, stackTags);
20116
20241
  }
20117
20242
  const stateDeletionFailures = [];
20118
20243
  for (const node of leafFirst) try {
@@ -20150,6 +20275,49 @@ async function runPerStackImportPhases(ctx) {
20150
20275
  };
20151
20276
  }
20152
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
+
20153
20321
  // src/cli/commands/export/per-stack-loop.ts
20154
20322
  async function runPerStackImportLoop(args) {
20155
20323
  const logger = getLogger();
@@ -20226,6 +20394,8 @@ async function runPerStackImportLoop(args) {
20226
20394
  nestedStackRows: plan.nestedStackRows
20227
20395
  });
20228
20396
  }
20397
+ const stackTagsByCdkdName = exportedStackTagsByStack(perStackPlans, rootStackName, args.rootStackTags, (line) => logger.warn(line));
20398
+ refuseFlipTagBudget(stackTagsByCdkdName, rootStackName);
20229
20399
  const totalPhase2Creates = perStackPlans.reduce((acc, p) => acc + p.phase2Creates.length, 0);
20230
20400
  const totalRecreate = perStackPlans.reduce((acc, p) => acc + p.recreateBeforePhase2.length, 0);
20231
20401
  logger.info("");
@@ -20324,6 +20494,7 @@ async function runPerStackImportLoop(args) {
20324
20494
  cfnStackNameOf,
20325
20495
  perStackPlans,
20326
20496
  paramsByCdkdName,
20497
+ stackTagsByCdkdName,
20327
20498
  sessionIntrinsicSkipped,
20328
20499
  cfnArnByCdkdName,
20329
20500
  uploadCleanups,
@@ -20387,11 +20558,14 @@ async function exportCommand(stackArg, options) {
20387
20558
  const lockManager = new LockManager(awsClients.s3, stateConfig);
20388
20559
  let template;
20389
20560
  let legacyAssetStack;
20561
+ let stackTags;
20390
20562
  let resolvedStackName;
20391
20563
  let synthedRegion;
20392
20564
  let templateFormat = "json";
20393
20565
  let allSynthStacks = [];
20394
20566
  let rootNestedTemplatePaths = nullPrototypeRecord();
20567
+ const stackTagsOverride = resolveStackTagsOverride(options.tags, (line) => logger.warn(line));
20568
+ stackTags = stackTagsOverride;
20395
20569
  if (options.template) {
20396
20570
  if (!stackArg) throw new Error("--template requires a stack name as a positional argument to identify the cdkd state record.");
20397
20571
  const parsed = parseTemplateFile(options.template);
@@ -20427,6 +20601,7 @@ async function exportCommand(stackArg, options) {
20427
20601
  refuseFailedLookups([stackInfo], result.stacks, result.failedLookups);
20428
20602
  template = stackInfo.template;
20429
20603
  legacyAssetStack = stackInfo;
20604
+ stackTags = stackTagsOverride ?? stackInfo.tags;
20430
20605
  resolvedStackName = stackInfo.stackName;
20431
20606
  synthedRegion = stackInfo.region;
20432
20607
  rootNestedTemplatePaths = stackInfo.nestedTemplates ?? nullPrototypeRecord();
@@ -20523,6 +20698,7 @@ async function exportCommand(stackArg, options) {
20523
20698
  childMap: childOverrides
20524
20699
  },
20525
20700
  rootParameters: rootParametersForNested,
20701
+ rootStackTags: stackTags,
20526
20702
  deps: {
20527
20703
  cfnClient: awsClients.cloudFormation,
20528
20704
  ec2Client: awsClients.ec2,
@@ -20647,6 +20823,7 @@ async function exportCommand(stackArg, options) {
20647
20823
  2. Re-run the phase 2 UPDATE manually with the full synth template:
20648
20824
  ${phase2RetryCommand(cfnStackName)}\n 3. Once phase 2 succeeds, clean up cdkd's stale state record.${orphan.note}\n Run: ${orphan.command}`);
20649
20825
  }
20826
+ await applyExportedStackTags(awsClients.cloudFormation, cfnStackName, cfnParameters, stackTags);
20650
20827
  await removeExportedStackRecord(stateBackend, resolvedStackName, targetRegion, logger);
20651
20828
  if (typeof state.signalReceiverStackId === "string") await deleteSignalReceiver(awsClients.cloudFormation, state.signalReceiverStackId, logger);
20652
20829
  logger.info(`cdkd state for ${quotedOrNotShown(resolvedStackName)} (${quotedRegion(targetRegion)}) removed. Manage the stack with 'cdk deploy' or 'aws cloudformation' from here on.`);
@@ -20667,7 +20844,7 @@ async function exportCommand(stackArg, options) {
20667
20844
 
20668
20845
  // src/cli/commands/export.ts
20669
20846
  function createExportCommand() {
20670
- 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));
20671
20848
  [
20672
20849
  ...commonOptions,
20673
20850
  ...appOptions,
@@ -27394,6 +27571,50 @@ async function readDeployedTemplate(cfnClient, stackName, consequence) {
27394
27571
  if (resources === null || typeof resources !== "object" || Array.isArray(resources)) throw refuse("the template CloudFormation last deployed has no Resources section.");
27395
27572
  return parsed;
27396
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
+ }
27397
27618
  function newNames() {
27398
27619
  return {
27399
27620
  targets: /* @__PURE__ */ new Set(),
@@ -27848,7 +28069,8 @@ async function importNestedStackChildrenRecursive(args) {
27848
28069
  });
27849
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.");
27850
28071
  const childOverlay = overlayDeployedProperties(childStateTemplate, childDeployedTemplate, logger, displaySafe(childStackName));
27851
- 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));
27852
28074
  const rows = [];
27853
28075
  for (const { logicalId, resource } of withDeployedDefinitions(childResources, childOverlay)) {
27854
28076
  if (resource.Type === "AWS::CloudFormation::Stack" && childTreeNode.nested.has(logicalId)) {
@@ -27889,6 +28111,7 @@ async function importNestedStackChildrenRecursive(args) {
27889
28111
  if (imports !== void 0) childStackState.imports = imports;
27890
28112
  if (outputReads !== void 0) childStackState.outputReads = outputReads;
27891
28113
  } else if (childStackInstanceId !== void 0) childStackState.stackInstanceId = childStackInstanceId;
28114
+ withMigratedNestedStackTags(childStackState, migratedNestedStackTags(childStackTags, childDeployedTemplate, childTreeNode.nested.keys()));
27892
28115
  const childDeployedParameters = namesAnyDeclaredParameter(childRecordTemplate) ? await readDeployedParameters(childTreeNode.stackName, args.cfnClient, logger, displaySafe(childStackName)) : void 0;
27893
28116
  const childUnsafeObservedBaselineLogicalIds = await withSharedDrainBudget(() => resolveImportedProperties(childStackState, childRecordTemplate, childRegion, stateBackend, logger, childDeployedParameters));
27894
28117
  await captureObservedForImportedResources(childStackState, providerRegistry, logger, childUnsafeObservedBaselineLogicalIds, rebuiltLogicalIdsFrom(rows, childRecordTemplate));
@@ -27901,6 +28124,8 @@ async function importNestedStackChildrenRecursive(args) {
27901
28124
  parentRegion: childRegion,
27902
28125
  parentNestedTemplates: indexGrandchildTemplatePaths(childStateTemplate, childTemplatePath),
27903
28126
  parentTree: childTreeNode,
28127
+ parentStackTags: childStackTags,
28128
+ parentDeployedTemplate: childDeployedTemplate,
27904
28129
  nestedPath: [...args.nestedPath, childLogicalId],
27905
28130
  replaced: args.replaced,
27906
28131
  stateBackend,
@@ -28014,7 +28239,7 @@ async function dispatchInRefOrder(resources, overrides, importRow) {
28014
28239
 
28015
28240
  // src/cli/commands/import/locked-import.ts
28016
28241
  async function runLockedImport(ctx) {
28017
- 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;
28018
28243
  let { migrationTree } = ctx;
28019
28244
  let recordTemplate = stateTemplate;
28020
28245
  let dispatchResources = resources;
@@ -28030,6 +28255,8 @@ async function runLockedImport(ctx) {
28030
28255
  recordTemplate = overlay.template;
28031
28256
  dispatchResources = withDeployedDefinitions(resources, overlay);
28032
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));
28033
28260
  const collectRows = () => dispatchInRefOrder(dispatchResources, overrides, async ({ logicalId, resource }, refValues) => {
28034
28261
  if (selectiveMode && !overrides.has(logicalId)) return {
28035
28262
  logicalId,
@@ -28061,6 +28288,7 @@ async function runLockedImport(ctx) {
28061
28288
  const assembleStackState = () => {
28062
28289
  const assembled = buildStackState(stackInfo.stackName, targetRegion, rows, templateParser, recordTemplate, existingState, selectiveMode);
28063
28290
  refuseMalformedResourceEntriesForImportSave(assembled, stackInfo.stackName, targetRegion, lockRecovery);
28291
+ if (migrationCfnStackName !== void 0 && migrationTree !== void 0) withMigratedNestedStackTags(assembled, migratedNestedStackTags(recordStackTags ?? {}, deployedTemplate, migrationTree.nested.keys()));
28064
28292
  return assembled;
28065
28293
  };
28066
28294
  let stackState = assembleStackState();
@@ -28157,6 +28385,8 @@ async function runLockedImport(ctx) {
28157
28385
  parentRegion: targetRegion,
28158
28386
  parentNestedTemplates: stackInfo.nestedTemplates ?? nullPrototypeRecord(),
28159
28387
  parentTree: migrationTree,
28388
+ parentStackTags: recordStackTags ?? {},
28389
+ parentDeployedTemplate: deployedTemplate,
28160
28390
  nestedPath: [],
28161
28391
  replaced: nestedReplaced,
28162
28392
  stateBackend,
@@ -28223,6 +28453,7 @@ async function importCommand(stackArg, options) {
28223
28453
  const lockManager = new LockManager(awsClients.s3, stateConfig);
28224
28454
  const appCmd = options.app || resolveApp();
28225
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));
28226
28457
  logger.info(synthesisStatusMessage(appCmd, "Synthesizing CDK app to read template..."));
28227
28458
  const synthesizer = new Synthesizer();
28228
28459
  const context = parseContextOptions(options.context);
@@ -28391,6 +28622,7 @@ async function importCommand(stackArg, options) {
28391
28622
  providerRegistry,
28392
28623
  assetRedirect,
28393
28624
  stateTemplate,
28625
+ stackTagsOverride,
28394
28626
  overrides,
28395
28627
  userOverrideIds,
28396
28628
  autoModeCfnStackName,
@@ -28420,7 +28652,7 @@ async function importCommand(stackArg, options) {
28420
28652
 
28421
28653
  // src/cli/commands/import.ts
28422
28654
  function createImportCommand() {
28423
- 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));
28424
28656
  [
28425
28657
  ...commonOptions,
28426
28658
  ...appOptions,
@@ -37248,4 +37480,4 @@ function collectVerbFlags(program) {
37248
37480
  }
37249
37481
 
37250
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 };
37251
- //# sourceMappingURL=program-BqTL728g.js.map
37483
+ //# sourceMappingURL=program-Bq6COj9L.js.map