@go-to-k/cdkd 0.297.0 → 0.298.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-D9Po293s.js → asg-provider-semUK44T.js} +4 -4
- package/dist/{asg-provider-D9Po293s.js.map → asg-provider-semUK44T.js.map} +1 -1
- package/dist/{aws-failure-text-BaWeCWRz.js → aws-failure-text-DtvlUugx.js} +2 -2
- package/dist/{aws-failure-text-BaWeCWRz.js.map → aws-failure-text-DtvlUugx.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-dvf1UDuo.js → deploy-engine-A-Ys_mhE.js} +2781 -716
- package/dist/deploy-engine-A-Ys_mhE.js.map +1 -0
- package/dist/{iam-policy-targets-Cz2tPxXk.js → iam-policy-targets-CwKiK9nS.js} +2 -2
- package/dist/{iam-policy-targets-Cz2tPxXk.js.map → iam-policy-targets-CwKiK9nS.js.map} +1 -1
- package/dist/{iam-role-provider--5HuX51Z.js → iam-role-provider-CpqTal4K.js} +24 -4
- package/dist/{iam-role-provider--5HuX51Z.js.map → iam-role-provider-CpqTal4K.js.map} +1 -1
- package/dist/index.d.ts +22 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{neptune-provider-xROL9y31.js → neptune-provider-C4A86Y7P.js} +4 -4
- package/dist/{neptune-provider-xROL9y31.js.map → neptune-provider-C4A86Y7P.js.map} +1 -1
- package/dist/{program-NRnM6vPK.js → program-D5gcmWad.js} +247 -46
- package/dist/program-D5gcmWad.js.map +1 -0
- package/dist/{provider-classes-uUFRfL9s.js → provider-classes-CuZ-P4gB.js} +78 -11
- package/dist/provider-classes-CuZ-P4gB.js.map +1 -0
- package/dist/{rds-provider-CU0LZr05.js → rds-provider-X4mc-nGw.js} +4 -4
- package/dist/{rds-provider-CU0LZr05.js.map → rds-provider-X4mc-nGw.js.map} +1 -1
- package/dist/{version-DE-djeB0.js → version-CItAaDXu.js} +2 -2
- package/dist/{version-DE-djeB0.js.map → version-CItAaDXu.js.map} +1 -1
- package/package.json +8 -7
- package/dist/deploy-engine-dvf1UDuo.js.map +0 -1
- package/dist/program-NRnM6vPK.js.map +0 -1
- package/dist/provider-classes-uUFRfL9s.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients, t as AwsClients } from "./aws-clients-CnmtbrxD.js";
|
|
2
|
-
import { A as UNRENDERABLE, B as stringifyJsonPayload, D as SAFE_MSG_ALTERED_CHAR, F as displayStackName, I as isPasteableIdent, M as displayAwsMessage, N as displayIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displaySafe, R as plainIdentOr, T as withStackName,
|
|
3
|
-
import { $n as isAmbiguousOutcomeError, $t as credentialFingerprint, Bn as withheldTargetClause, D as VALUE_NOT_SHOWN, Dn as TIMEOUT_FLAG_RESOURCE_TYPE, E as assertRegionMatch, En as withErrorHandling, Ft as buildLockContentionMessage, G as runDeleteAttempt, Hn as setPasteableVerbFlags, Ht as CUSTOM_RESOURCE_RESPONSE_PREFIX, In as plainOrDescribed, It as forceQuitRecoveryClause, Jt as setPasteableAwsProfile, Kt as producerCoordinateKey, Ln as quotedOrDescribed, Lt as formatLockExpiry, Nn as isInertUnquoted, Nt as UNREPRODUCIBLE_LOCK_CLAUSE, P as remedyLogicalId, Pn as pasteableCommand, Pt as buildForceUnlockCommand, Qt as clientDefaultsFor, Rn as shellBoundedDisplay, Rt as formatLockOperation, Sn as SynthesisError, T as RESOURCE_NOT_FOUND, Tn as normalizeAwsError, Ut as DEFAULT_STATE_PREFIX, Vn as setPasteableRunFlags, Wt as injectiveKey, Xt as ambientClientDefaults, Yt as withPasteableAwsProfile, Z as isAwsCliLiteral, Zt as ambientCredentialConfig, _n as ResourceTimeoutError, ar as isMarkedNonRetryable, bn as StackTerminationProtectionError, cn as IntrinsicResolutionRefusalError, en as AccountIdUnavailableError, ft as logicalIdShown, gn as ProvisioningError, hn as PartialFailureError, in as CrossAccountSecretRefusalError, it as isInterruptedWaitError, jn as commandHole, kn as SHELL_ACTIVE_WHY, ln as LocalInvokeBuildError$1, mn as NestedStackChildDirectDestroyError, mt as resourceTypeShown, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as CdkdError, nr as isTransientServerError, nt as endCommandInterruptScope, on as DeployCancelledError, or as isThrottlingError, pn as MalformedProducerRecordRefusalError, qt as producerRecordKey, rr as retryClassificationText, rt as interruptWatchListenerCount, s as readRecordedPrincipals, sn as DynamicReferenceRegionAmbiguousError, sr as markNonRetryable, t as IAM_PRINCIPAL_NAME, tr as isRetryableTransientError, tt as beginCommandInterruptScope, un as LocalStartServiceError, vn as ResourceUpdateNotSupportedError, yn as StackHasActiveImportsError, zn as shellQuote, zt as formatLockOwner } from "./iam-policy-targets-
|
|
2
|
+
import { A as UNRENDERABLE, B as stringifyJsonPayload, D as SAFE_MSG_ALTERED_CHAR, F as displayStackName, H as truncateCodePoints, I as isPasteableIdent, M as displayAwsMessage, N as displayIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displaySafe, R as plainIdentOr, T as withStackName, _ as derivesPatternBName, a as getLogger, f as getLiveRenderer, h as PATTERN_B_RESOURCE_TYPES, j as cutMarker, k as STACK_REF_MAX_CODE_POINTS, l as runStackBuffered, m as PATTERN_B_NAME_PROPERTIES, o as isStdoutReservedForPayload, p as PATTERN_B_NAME_OPTIONS, r as safeStringify, s as reserveStdoutForPayload, t as describeAwsFailure, v as explicitNamePropertyFor, w as withSkipPrefix, y as generateResourceName, z as safeMsg } from "./aws-failure-text-DtvlUugx.js";
|
|
3
|
+
import { $n as isAmbiguousOutcomeError, $t as credentialFingerprint, Bn as withheldTargetClause, D as VALUE_NOT_SHOWN, Dn as TIMEOUT_FLAG_RESOURCE_TYPE, E as assertRegionMatch, En as withErrorHandling, Ft as buildLockContentionMessage, G as runDeleteAttempt, Hn as setPasteableVerbFlags, Ht as CUSTOM_RESOURCE_RESPONSE_PREFIX, In as plainOrDescribed, It as forceQuitRecoveryClause, Jt as setPasteableAwsProfile, Kt as producerCoordinateKey, Ln as quotedOrDescribed, Lt as formatLockExpiry, Nn as isInertUnquoted, Nt as UNREPRODUCIBLE_LOCK_CLAUSE, P as remedyLogicalId, Pn as pasteableCommand, Pt as buildForceUnlockCommand, Qt as clientDefaultsFor, Rn as shellBoundedDisplay, Rt as formatLockOperation, Sn as SynthesisError, T as RESOURCE_NOT_FOUND, Tn as normalizeAwsError, Ut as DEFAULT_STATE_PREFIX, Vn as setPasteableRunFlags, Wt as injectiveKey, Xt as ambientClientDefaults, Yt as withPasteableAwsProfile, Z as isAwsCliLiteral, Zt as ambientCredentialConfig, _n as ResourceTimeoutError, ar as isMarkedNonRetryable, bn as StackTerminationProtectionError, cn as IntrinsicResolutionRefusalError, en as AccountIdUnavailableError, ft as logicalIdShown, gn as ProvisioningError, hn as PartialFailureError, in as CrossAccountSecretRefusalError, it as isInterruptedWaitError, jn as commandHole, kn as SHELL_ACTIVE_WHY, ln as LocalInvokeBuildError$1, mn as NestedStackChildDirectDestroyError, mt as resourceTypeShown, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as CdkdError, nr as isTransientServerError, nt as endCommandInterruptScope, on as DeployCancelledError, or as isThrottlingError, pn as MalformedProducerRecordRefusalError, qt as producerRecordKey, rr as retryClassificationText, rt as interruptWatchListenerCount, s as readRecordedPrincipals, sn as DynamicReferenceRegionAmbiguousError, sr as markNonRetryable, t as IAM_PRINCIPAL_NAME, tr as isRetryableTransientError, tt as beginCommandInterruptScope, un as LocalStartServiceError, vn as ResourceUpdateNotSupportedError, yn as StackHasActiveImportsError, zn as shellQuote, zt as formatLockOwner } from "./iam-policy-targets-CwKiK9nS.js";
|
|
4
4
|
import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
|
|
5
|
-
import { $c as derivePartitionAndUrlSuffix, $i as malformedResourceEntriesWarning, $o as isUncertifiedBaselineMaskPosition, $r as AWS_CREDENTIAL_ENV_KEYS, $s as ensureAssetStorage, $t as orphanDeleteNeedsIdentity, A as noEchoExactEchoLeavesOf, Aa as repairMalformedOrphansForReadOnly, Ac as getDefaultStateBucketName, Ai as UNREADABLE_RESOURCES_MAP_ROW, An as maskEventTextWithBoundBags, Ar as deleteSkipReason, As as acceptedCreateOnlyDropsOf, At as isHandledOrphan, Bc as stateBucketExistenceConfirmed, Bi as malformedExportNamesWarning, Bn as ccRoutedFinalSnapshotError, Bo as printingCorpusOf, Br as DiffCalculator, Bs as orphansCarriedFrom, Bt as withStackRecords, C as recordRetainedForReadoption, Ca as refuseMalformedResourcePropertiesForExport, Cc as warnFinchArgvExposure, Ci as withSharedDrainBudget, Cn as collectPublishedOutputNames, Co as maskAtCoordinates, Cr as customResourceResponseExpirationWarning, Cs as CrossPrefixReadError, Ct as revertedNestedRowIds, D as withResourceDeadline, Da as refuseMalformedResourcesForExport, Dc as getDockerImageBySourceHash, Di as STATE_REGION_DIVERGED, Dn as DEFAULT_RESOURCE_WARN_AFTER_MS, Do as noEchoCoordinatesOf, Dr as UNSPECIFIED_SKIP_REASON, Ds as isAccessDenied, Dt as withNestedStackContext, E as serviceTokenBlockingReason, Ea as refuseMalformedResourcesForDestroy, Ec as AssetManifestLoader, Ei as JSON_LISTING_HOLE_VALUE, En as DEFAULT_RESOURCE_TIMEOUT_MS, Eo as maskedLeafCoordinatesOf, Es as crossPrefixDeniedWarning, F as isProtectionValueActive, Fa as unpreviewableOrphanRecords, Fc as resolveCaptureObservedState, Fi as hasReadableOutputs, Fn as storedSecretNameNeedles, Fo as carryLogOnlyValues, Fs as hasUnverifiableParameterRefusal, Ft as replayFailedOperations, Ga as findReplacedReadersOfRecreateTargets, Gc as MIGRATE_TMP_PREFIX, Gi as malformedOrphanRecordsRefusalMessage, Gn as unsupportedFinalSnapshotError, Go as errorCauseChain, Gr as producerRegionsFromState, Gs as WorkGraph, Gt as isReplacementOrphan, Hc as ssmResolvedValueType, Hi as malformedLocalOutputsWarning, Hn as effectiveDeletionPolicy, Ho as recordLogOnlyValue, Hr as IntrinsicFunctionResolver, Hs as AssetPublisher, Ht as recordAfterRollbackUpdate, I as perType, Ia as unreadableOrphanRecords, Ic as resolveSkipPrefix, Ii as hasReadableResources, In as extractDeploymentEventError, Io as createUnionSecretMasker, Is as importableOutputKeys, It as replayRollback, Ja as isStatefulRecreateTargetForReplace, Jc as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ji as malformedOrphansRefusalMessage, Jn as findDestructiveChanges, Jo as markSameGenerationBag, Jr as assertFlagRoleArn, Js as loadPublishableAssetManifest, Jt as recheckFailedPlan, Ka as shownType, Kc as findLargeInlineResources, Ki as malformedOrphanRecordsWarning, Kn as maskingRetryLogger, Ko as maskSecretsInError, Kr as regionLessSecretName, Ks as buildAssetRedirectMap, Kt as planFailedOps, L as readProtection, La as unreadableResourceEntries, Lc as resolveStateBucketWithDefault, Li as isReadableOrphanRecord, Ln as ATOMIC_FINAL_SNAPSHOT_TYPES, Lo as hasMaskableValues, Ls as importableOutputs, M as recordedProtectionEvidence, Ma as repairMalformedResourceEntriesForReadOnly, Mc as loadCdkJson, Mi as deployRefusesOrphanRowsReason, Mn as secretNamePrintingBag, Mo as readsNoEchoSource, Mr as isWaitAbandonedError, Ms as exportNamesCarriedFrom, Mt as loadJournaledOrphans, N as recordedProtectionNote, Na as repairMalformedResourcePropertiesForReadOnly, Nc as resolveApp, Ni as displayLogicalId, Nn as secretNamedRecordNeedles, No as valueAtCoordinate, Ns as hasReadableExportSet, Nt as makeForeignHolderScan, O as noEchoAttributeNamesOf, Oa as refuseMalformedState, Oc as Synthesizer, Oi as STATE_RESOURCES_MALFORMED, On as completedReplayEntries, Oo as noEchoLeavesOf, Or as deleteIndeterminateGuards, Os as isNotImplemented, Ot as deleteJournaledOrphans, P as PROTECTION_PROPERTY_BY_TYPE, Pa as repairMalformedResourcesForReadOnly, Pc as resolveAutoAssetStorage, Pi as hasReadableOrphans, Pn as stateSecretNameNeedles, Po as liveMatchesUnresolvedTokenFrame, Ps as hasReasonlessBaselineRefusal, Pt as sameJournaledOrphans, Qc as canonicalizeRegion, Qi as malformedRenderedContainersWarning, Qn as ledgerForStack, Qo as dynamicReferenceTokens, Qr as sendableAssumeRoleCommand, Qs as assertAssetBucketRegion, Qt as seedsDeleteFirstGuard, Ra as withheldAccountClause, Rc as resolveStateBucketWithDefaultAndSource, Ri as isReadableResourceEntry, Rn as PRE_DELETE_SNAPSHOT_TYPES, Ro as literalSplitDelimitersOf, Rs as isReadableBag, Rt as destroyStackRecordsView, S as keptForReadoption, Sa as refuseMalformedResourcePropertiesForDrift, Sc as runDockerStreaming, Sn as collectDeclaredOutputNames, So as isMarkedCoordinate, Sr as applyCustomResourceResponseExpiration, Ss as rebuildClientForBucketRegion, T as findServiceTokenRefusals, Ta as refuseMalformedResourcesForDeploy, Tc as stripControlChars, Tn as bindingSkippedOutputs, To as maskWholeValue, Tr as slowCcOperationTimeoutMs, Ts as applyCrossPrefixScan, Tt as collectNestedChildUnaddressed, Ua as NO_CC_HANDLERS_REASON, Uc as CFN_TEMPLATE_BODY_LIMIT, Ui as malformedLocalResourceEntriesWarning, Un as isFinalSnapshotError, Uo as shareLogOnlyValues, Ur as poisonRenderedSpellingsCollidingIn, Us as isSensitiveAttributeName, Ut as demoteSupersededOrphans, Va as unwrittenCreateOnlyReplacement, Vc as warnDeprecatedNoPrefixCliFlag, Vi as malformedExportSourceWarning, Vn as createPreDeleteFinalSnapshot, Vo as recordLogOnlyParameterValue, Vr as INTRINSIC_KEYS, Vs as shouldRetainResource, Vt as removeProtectionTypeList, Wa as hasNoCloudControlHandlers, Wc as CFN_TEMPLATE_URL_LIMIT, Wi as malformedLocalResourcesWarning, Wn as refusesFinalSnapshot, Wo as createSecretMasker, Wr as classifyReplaySecretRegion, Ws as stringifyValue, Wt as isJournaledOrphan, Xa as renderStatefulReason, Xc as expectedOwnerParam, Xi as malformedOutputsRefusalMessage, Xn as RollbackInlinePolicyWriters, Xo as scrubResourceRecord, Xr as explicitRoleArnOrThrow, Xs as AssetModeResolver, Xt as replacementNeverSwapped, Ya as isStatefulRecreateTargetSync, Yc as decodeListingKey, Yi as malformedOrphansWarning, Yn as formatDestructiveChange, Yo as redactSecretsForState, Yr as assertSendableRoleArn, Ys as rewriteTemplateAssetReferences, Yt as recordUnderIdIsNotOwn, Zc as PARTITION_TABLE, Zi as malformedOutputsWarning, Zo as DYNAMIC_REFERENCE_TOKEN_SCAN, Zr as isIamRoleArn, Zs as BOOTSTRAP_MARKER_PREFIX, Zt as resolveReplacementOldType, _ as makeCanonicalizePropertiesFn, _a as refuseMalformedResourceEntriesForDestroy, _c as isMalformedEnvKey, _i as keepsSecretReferenceToken, _n as carriedExportAliasExposure, _r as readsNoEchoDeleteValues, _s as WHOLE_DYNAMIC_REFERENCE_PATTERN, _t as displacedPhysicalIdShown, a as findNestedTemplateTreeDefect, aa as refuseDivergentRecordRegionForDestroy, ac as validateContainerRepoName, al as hasPlainPrototype, as as carriesSecretMask, at as gray, ba as refuseMalformedResourceEntriesForOrphan, bc as redactedDockerCause, bi as isStalePlaceholderArnAttribute, bn as isWholeDynamicReferenceValue, bo as TemplateParser, br as withPrintingSecrets, bs as isLockInfoExpired, bt as nestedChildStackName$1, c as renderNestedTemplateTreeDefect, ca as refuseMalformedOrphanRecordsForDestroy, cc as resolveDockerContextDirectory, cl as absoluteAssemblyPathEscape, cn as updatePartialReason, cs as recordMaskOnlyValuesIn, ct as yellow, d as conditionInputsFrom, da as refuseMalformedOrphansForOrphan, dc as describeDockerFailure, di as parameterTypeMayLoseSecretIdentity, dl as renderAssemblyPathEscape, dn as WITHHELD_NAME_DISPLAY, dr as CC_BROKEN_REASON, ds as recordProvenPublicExpression, dt as reachableDivergentParameters, ea as malformedResourcePropertiesWarning, ec as getBootstrapMarkerKey, ei as applyCallerIdentityCredentials, el as AssemblyReader, en as findNestedStackTypeChanges, er as withCreateTokenLedger, es as pathCrossesDottedKey, f as parentSuppliedValues, fa as refuseMalformedOutputs, fc as dockerSpawnEnvWithSensitive, fi as getAccountInfo, fl as resolveAssemblyPath, fn as displayTextOrWithheld, fo as prefetchCreateOnlyPropertyPaths, fr as ProviderRegistry, fs as wholeStringLeavesOf, ft as resourcesNamingDeclaredParameter, g as mergeNoChangeOutputs, ga as refuseMalformedResourceEntriesForDeploy, gc as isDockerClientEnvKey, gi as isNamelessDynamicReferenceError, gn as secretSafeKeyDisplay, gr as TemplateNoEchoReresolver, gs as TEMPLATE_SOURCED_RULES, gt as displacedOpClause, h as keptWholeReasonText, ha as refuseMalformedResourceEntries, hc as getDockerCmd, hi as carriesFetchableDynamicReference, hn as secretBearingStateKeyWarning, ho as withRetry, hr as wouldReturnToSdkProvider, hs as STATE_SOURCED_READBACK_RULES, ht as NESTED_PENDING_PARENT_REASON, i as childTemplateLoader, ia as previewableOrphanRecords, ic as validateAssetBucketName, il as hasOwnKey, it as cyan, j as noEchoParameterNamesOf, ja as repairMalformedOutputsForReadOnly, jc as getLegacyStateBucketName, ji as accountArgs, jn as orphanRecordsPrintingBag, jo as readbackPathFor, js as describeRegionValueKind, jt as journaledOrphanLines, k as noEchoComparisonForTemplate, ka as repairMalformedOrphanRecordsForReadOnly, kc as synthesisStatusMessage, ki as UNREADABLE_ORPHANS_CONTAINER_ROW, kn as journaledOrphanPrintingBag, ko as noEchoOutputsComparison, kr as deleteLeftInPlace, ks as splitImportedOps, kt as dropFailedHint, l as templateIdentity, la as refuseMalformedOrphans, lc as describeDockerCapturedOutput, li as coerceParameterTypedValue, ll as describeFileReadFailure, ln as DeploymentEventsReader, ls as recordNoEchoAttributeValues, lt as computeParameterTaint, m as isSecretBearingReferenceString, ma as refuseMalformedResourceAttributesForOrphan, mc as formatDockerLoginError, mi as carriesDynamicReference, ml as resolveBucketRegion, mn as secretBearing, mo as describeTypeWithThrottleRetry, mr as isCustomResource, ms as STATE_SOURCED_CROSS_GENERATION_RULES, mt as planOrphanAdoption, n as IMPLICIT_DELETE_DEPENDENCIES, na as malformedScrubResourceEntriesRefusalMessage, nc as parseBootstrapMarker, ni as envCredentialsAreAssumedRole, nl as processStackMessages, nn as inheritProducerRegions, ns as inheritNestedStackParameterAssociations, nt as createReadOnlyAttributeHealerFactory, o as isAbsoluteAssetPath, oc as buildDenyExternalAccessPolicy, ol as nullPrototypeRecord, os as provenPublicValue, ot as green, p as readRecordedConditionVerdicts, pa as refuseMalformedOutputsForDestroy, pc as finchSecretArgvRefusal, pi as isImpossibleEmptyStoredAttribute, pn as exportAliasCollisionScrubWarning, po as templateResourceTypes, pr as ccBrokenReason, ps as STATE_SOURCED_BASELINE_RULES, pt as makeSiblingClaimReader, qa as MULTI_REGION_RECREATE_BLOCKED_TYPES, qc as uploadCfnTemplate, qi as malformedOrphanRowsKeptWarning, qn as constructPathOf, qo as maskSecretsInText, qr as applyRoleArnIfSet, qs as createAssetRedirectResolver, qt as planRollback, r as computeImplicitDeleteEdges, ra as malformedStateRefusalMessage, rc as readBootstrapMarkerBody, rl as defineOwnKey, rs as recordNestedStackParameterExpressions, rt as bold, s as listNestedTemplateRows, sa as refuseMalformedOrphanRecords, sc as buildDockerImage, sl as ownValue, sn as updatePartialMessage, ss as recordMaskOnlyValue, st as red, t as DeployEngine, ta as malformedResourcesWarning, tc as isCrossRegionRedirect, ti as callerEnvCredentials, tl as StageLoadError, ts as identityKeyFor, tt as formatResourceLine, u as conditionFingerprint, ua as refuseMalformedOrphansForDestroy, uc as describeDockerExecFailure, ui as isUnboundTemplateParameter, ul as displayAssemblyPath, un as DeploymentEventsStore, us as recordNoEchoParameterFreshValue, ut as namesAnyDeclaredParameter, va as refuseMalformedResourceEntriesForImport, vc as partitionSensitiveEnv, vi as AWS_NO_VALUE, vn as exportNameNoEchoParameters, vr as isCustomResourceType$1, vs as isSingleDynamicReferenceToken, vt as dropSettledNestedJournals, w as deferredServiceTokenWarning, wa as refuseMalformedResourcePropertiesForOrphan, wc as escapeRegExp, wi as parameterInputsFor, wn as isExportAliasCollision, wo as maskReadbackAtCoordinates, wr as CloudControlProvider, ws as CrossPrefixScanCache, wt as withNestedRevertRun, xa as refuseMalformedResourcePropertiesForDestroy, xc as runDockerForeground, xi as refStateLookupFromResource, xn as noEchoParameterValueSeed, xo as canonicalCoordinates, xr as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, xs as S3StateBackend, xt as recordDisplacedSkips, ya as refuseMalformedResourceEntriesForImportSave, yc as redactDockerArgvValues, yi as cfnRefValueFromPhysicalId, yn as exportNameSecretExposure, yo as DagBuilder, ys as LockManager, za as findActionableSilentDrops, zc as resolveUseCdkBootstrapAssets, zi as malformedDriftResourcePropertiesWarning, zn as buildFinalSnapshotIdentifier, zo as logOnlyValueCount, zs as orphansAfterRollback } from "./deploy-engine-dvf1UDuo.js";
|
|
6
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { $a as isStatefulRecreateTargetForReplace, $c as CFN_TEMPLATE_BODY_LIMIT, $i as malformedOrphansRefusalMessage, $n as ledgerForStack, $o as markSameGenerationBag, $r as sendableAssumeRoleCommand, $s as isSensitiveAttributeName, $t as seedsDeleteFirstGuard, A as noEchoComparisonForTemplate, Aa as refuseMalformedResourcesForDeploy, Ac as redactedDockerCause, Ai as declaresNoEcho, An as journaledOrphanPrintingBag, Ao as maskWholeValue, Ar as deleteIndeterminateGuards, As as isLockInfoExpired, At as dropFailedHint, Ba as unpreviewableOrphanRecords, Bc as getDefaultStateBucketName, Bi as hasReadableOutputs, Bn as PRE_DELETE_SNAPSHOT_TYPES, Bo as carryLogOnlyValues, Bs as acceptedCreateOnlyDropsOf, C as recordRetainedForReadoption, Ca as refuseMalformedResourceEntriesForImport, Cc as finchSecretArgvRefusal, Ci as cfnRefValueFromPhysicalId, Cn as collectDeclaredOutputNames, Cr as applyCustomResourceResponseExpiration, Cs as STATE_SOURCED_BASELINE_RULES, D as withResourceDeadline, Da as refuseMalformedResourcePropertiesForDrift, Dc as isMalformedEnvKey, Di as withSharedDrainBudget, Dn as DEFAULT_RESOURCE_TIMEOUT_MS, Do as isMarkedCoordinate, Ds as WHOLE_DYNAMIC_REFERENCE_PATTERN, E as serviceTokenBlockingReason, Ea as refuseMalformedResourcePropertiesForDestroy, Ec as isDockerClientEnvKey, En as bindingSkippedOutputs, Eo as canonicalCoordinates, Er as slowCcOperationTimeoutMs, Es as TEMPLATE_SOURCED_RULES, Et as collectNestedChildUnaddressed, F as PROTECTION_PROPERTY_BY_TYPE, Fa as repairMalformedOrphansForReadOnly, Fc as stripControlChars, Fi as UNREADABLE_RESOURCES_MAP_ROW, Fn as secretNamedRecordNeedles, Fs as applyCrossPrefixScan, Ft as sameJournaledOrphans, Gc as resolveCaptureObservedState, Gi as malformedExportNamesWarning, Gn as isFinalSnapshotError, Go as printingCorpusOf, Gr as poisonRenderedSpellingsCollidingIn, Gs as hasUnverifiableParameterRefusal, Gt as isJournaledOrphan, Ha as unreadableResourceEntries, Hc as loadCdkJson, Hi as isReadableOrphanRecord, Hn as ccRoutedFinalSnapshotError, Ho as hasMaskableValues, Hr as DiffCalculator, Hs as exportNamesCarriedFrom, Ht as removeProtectionTypeList, I as isProtectionValueActive, Ia as repairMalformedOutputsForReadOnly, Ic as AssetManifestLoader, Ii as accountArgs, In as stateSecretNameNeedles, Io as readbackPathFor, Is as crossPrefixDeniedWarning, It as replayFailedOperations, Ja as NO_CC_HANDLERS_REASON, Jc as resolveStateBucketWithDefaultAndSource, Ji as malformedLocalResourceEntriesWarning, Jn as maskingRetryLogger, Jo as shareLogOnlyValues, Jr as applyRoleArnIfSet, Js as isReadableBag, Jt as planRollback, Ka as unwrittenCreateOnlyReplacement, Kc as resolveSkipPrefix, Ki as malformedExportSourceWarning, Kn as refusesFinalSnapshot, Ko as recordLogOnlyParameterValue, Kr as producerLookupOver, Ks as importableOutputKeys, Kt as isReplacementOrphan, L as perType, La as repairMalformedResourceEntriesForReadOnly, Lc as getDockerImageBySourceHash, Li as deployRefusesOrphanRowsReason, Ln as storedSecretNameNeedles, Lo as readsNoEchoSource, Ls as isAccessDenied, Lt as replayRollback, M as noEchoParameterNamesOf, Ma as refuseMalformedResourcesForExport, Mc as runDockerStreaming, Mi as STATE_REGION_DIVERGED, Mn as orphanRecordsPrintingBag, Mo as noEchoCoordinatesOf, Mr as deleteSkipReason, Ms as rebuildClientForBucketRegion, Mt as journaledOrphanLines, N as recordedProtectionEvidence, Na as refuseMalformedState, Nc as warnFinchArgvExposure, Ni as STATE_RESOURCES_MALFORMED, Nn as secretNamePrintingBag, No as noEchoLeavesOf, Ns as CrossPrefixReadError, Nt as loadJournaledOrphans, O as diffSecurity, Oa as refuseMalformedResourcePropertiesForExport, Oc as partitionSensitiveEnv, Oi as parameterInputsFor, On as DEFAULT_RESOURCE_WARN_AFTER_MS, Oo as maskAtCoordinates, Or as RollbackInlinePolicyWriters, Os as isSingleDynamicReferenceToken, Ot as withNestedStackContext, P as recordedProtectionNote, Pa as repairMalformedOrphanRecordsForReadOnly, Pc as escapeRegExp, Pi as UNREADABLE_ORPHANS_CONTAINER_ROW, Pn as secretNamePrintingBags, Po as noEchoOutputsComparison, Pr as isWaitAbandonedError, Ps as CrossPrefixScanCache, Pt as makeForeignHolderScan, Qa as MULTI_REGION_RECREATE_BLOCKED_TYPES, Qc as ssmResolvedValueType, Qi as malformedOrphanRowsKeptWarning, Qo as maskSecretsInText, Qr as isIamRoleArn, Qs as AssetPublisher, Qt as resolveReplacementOldType, R as readProtection, Ra as repairMalformedResourcePropertiesForReadOnly, Rc as Synthesizer, Ri as displayLogicalId, Rn as extractDeploymentEventError, Ro as valueAtCoordinate, Rs as isNotImplemented, S as keptForReadoption, Sa as refuseMalformedResourceEntriesForDestroy, Sc as dockerSpawnEnvWithSensitive, Si as AWS_NO_VALUE, Sl as resolveAssemblyPath, Sn as noEchoParameterValueSeed, Sr as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, Ss as wholeStringLeavesOf, St as recordDisplacedSkips, T as findServiceTokenRefusals, Ta as refuseMalformedResourceEntriesForOrphan, Tc as getDockerCmd, Ti as refStateLookupFromResource, Tn as isExportAliasCollision, To as TemplateParser, Tr as CloudControlProvider, Ts as STATE_SOURCED_READBACK_RULES, Tt as withNestedRevertRun, Ua as withheldAccountClause, Uc as resolveApp, Ui as isReadableResourceEntry, Un as createPreDeleteFinalSnapshot, Uo as literalSplitDelimitersOf, Ur as INTRINSIC_KEYS, Us as hasReadableExportSet, Ut as recordAfterRollbackUpdate, Va as unreadableOrphanRecords, Vc as getLegacyStateBucketName, Vi as hasReadableResources, Vn as buildFinalSnapshotIdentifier, Vo as createUnionSecretMasker, Vs as describeRegionValueKind, Vt as withStackRecords, Wa as findActionableSilentDrops, Wc as resolveAutoAssetStorage, Wi as malformedDriftResourcePropertiesWarning, Wn as effectiveDeletionPolicy, Wo as logOnlyValueCount, Wr as IntrinsicFunctionResolver, Ws as hasReasonlessBaselineRefusal, Wt as demoteSupersededOrphans, Xa as findReplacedReadersOfRecreateTargets, Xc as stateBucketExistenceConfirmed, Xi as malformedOrphanRecordsRefusalMessage, Xn as findDestructiveChanges, Xo as errorCauseChain, Xr as assertSendableRoleArn, Xs as orphansCarriedFrom, Xt as recordUnderIdIsNotOwn, Ya as hasNoCloudControlHandlers, Yc as resolveUseCdkBootstrapAssets, Yi as malformedLocalResourcesWarning, Yn as constructPathOf, Yo as createSecretMasker, Yr as assertFlagRoleArn, Ys as orphansAfterRollback, Yt as recheckFailedPlan, Za as shownType, Zc as warnDeprecatedNoPrefixCliFlag, Zi as malformedOrphanRecordsWarning, Zn as formatDestructiveChange, Zo as maskSecretsInError, Zr as explicitRoleArnOrThrow, Zs as shouldRetainResource, Zt as replacementNeverSwapped, _ as makeCanonicalizePropertiesFn, _a as refuseMalformedOutputs, _c as buildDockerImage, _i as isImpossibleEmptyStoredAttribute, _l as ownValue, _n as secretSafeKeyDisplay, _o as prefetchCreateOnlyPropertyPaths, _r as TemplateNoEchoReresolver, _s as recordMaskOnlyValue, _t as displacedOpClause, a as findNestedTemplateTreeDefect, aa as malformedResourcePropertiesWarning, ac as rewriteTemplateAssetReferences, al as decodeListingKey, as as dynamicReferenceTokens, at as cyan, ba as refuseMalformedResourceEntries, bc as describeDockerExecFailure, bi as isNamelessDynamicReferenceError, bl as displayAssemblyPath, bn as exportNameSecretExposure, bo as withRetry, bs as recordNoEchoParameterFreshValue, c as renderNestedTemplateTreeDefect, ca as malformedStateRefusalMessage, cc as assertAssetBucketRegion, cl as canonicalizeRegion, cn as updatePartialMessage, cs as identityKeyFor, ct as red, d as conditionInputsFrom, dc as isCrossRegionRedirect, di as producerRegionsFromState, dl as StageLoadError, dn as DeploymentEventsStore, dt as namesAnyDeclaredParameter, ea as malformedOrphansWarning, ec as stringifyValue, ei as AWS_CREDENTIAL_ENV_KEYS, el as CFN_TEMPLATE_URL_LIMIT, en as orphanDeleteNeedsIdentity, eo as isStatefulRecreateTargetSync, es as redactSecretsForState, f as parentSuppliedValues, fa as refuseMalformedOrphanRecords, fc as parseBootstrapMarker, fi as regionLessSecretName, fl as processStackMessages, fn as WITHHELD_NAME_DISPLAY, fr as CC_BROKEN_REASON, fs as physicalNameCopiesOf, ft as reachableDivergentParameters, g as mergeNoChangeOutputs, ga as refuseMalformedOrphansForOrphan, gc as buildDenyExternalAccessPolicy, gi as getAccountInfo, gl as nullPrototypeRecord, gn as secretBearingStateKeyWarning, gr as wouldReturnToSdkProvider, gs as provenPublicValue, gt as NESTED_PENDING_PARENT_REASON, h as keptWholeReasonText, ha as refuseMalformedOrphansForDestroy, hc as validateContainerRepoName, hi as parameterTypeMayLoseSecretIdentity, hl as hasPlainPrototype, hn as secretBearing, hr as isCustomResource, hs as carriesSecretMask, ht as planOrphanAdoption, i as childTemplateLoader, ia as malformedResourceEntriesWarning, ic as loadPublishableAssetManifest, il as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, is as DYNAMIC_REFERENCE_TOKEN_SCAN, it as bold, j as noEchoExactEchoLeavesOf, ja as refuseMalformedResourcesForDestroy, jc as runDockerForeground, ji as JSON_LISTING_HOLE_VALUE, jn as maskEventTextWithBoundBags, jo as maskedLeafCoordinatesOf, jr as deleteLeftInPlace, js as S3StateBackend, jt as isHandledOrphan, k as noEchoAttributeNamesOf, ka as refuseMalformedResourcePropertiesForOrphan, kc as redactDockerArgvValues, kn as completedReplayEntries, ko as maskReadbackAtCoordinates, kr as UNSPECIFIED_SKIP_REASON, ks as LockManager, kt as deleteJournaledOrphans, l as templateIdentity, la as previewableOrphanRecords, lc as ensureAssetStorage, ll as derivePartitionAndUrlSuffix, ln as updatePartialReason, ls as inheritNestedStackParameterAssociations, lt as yellow, m as isSecretBearingReferenceString, ma as refuseMalformedOrphans, mc as validateAssetBucketName, mi as isUnboundTemplateParameter, ml as hasOwnKey, mn as exportAliasCollisionScrubWarning, mr as ccBrokenReason, ms as splitGetAttStringForm, mt as makeSiblingClaimReader, n as IMPLICIT_DELETE_DEPENDENCIES, na as malformedOutputsWarning, nc as buildAssetRedirectMap, ni as callerEnvCredentials, nl as findLargeInlineResources, ns as withPhysicalNameCopies, nt as formatResourceLine, o as isAbsoluteAssetPath, oa as malformedResourcesWarning, oc as AssetModeResolver, ol as expectedOwnerParam, os as isUncertifiedBaselineMaskPosition, ot as gray, p as readRecordedConditionVerdicts, pa as refuseMalformedOrphanRecordsForDestroy, pc as readBootstrapMarkerBody, pi as coerceParameterTypedValue, pl as defineOwnKey, pn as displayTextOrWithheld, pr as ProviderRegistry, ps as recordPhysicalNameCopy, pt as resourcesNamingDeclaredParameter, qc as resolveStateBucketWithDefault, qi as malformedLocalOutputsWarning, qn as unsupportedFinalSnapshotError, qo as recordLogOnlyValue, qr as refuseUnreadableCdkCrossAccountRefs, qs as importableOutputs, qt as planFailedOps, r as computeImplicitDeleteEdges, ra as malformedRenderedContainersWarning, rc as createAssetRedirectResolver, ri as envCredentialsAreAssumedRole, rl as uploadCfnTemplate, rn as inheritProducerRegions, rt as createReadOnlyAttributeHealerFactory, s as listNestedTemplateRows, sa as malformedScrubResourceEntriesRefusalMessage, sc as BOOTSTRAP_MARKER_PREFIX, sl as PARTITION_TABLE, ss as pathCrossesDottedKey, st as green, t as DeployEngine, ta as malformedOutputsRefusalMessage, tc as WorkGraph, ti as applyCallerIdentityCredentials, tl as MIGRATE_TMP_PREFIX, tn as findNestedStackTypeChanges, to as renderStatefulReason, tr as withCreateTokenLedger, ts as scrubResourceRecord, u as conditionFingerprint, ua as refuseDivergentRecordRegionForDestroy, uc as getBootstrapMarkerKey, ui as classifyReplaySecretRegion, ul as AssemblyReader, un as DeploymentEventsReader, us as recordNestedStackParameterExpressions, ut as computeParameterTaint, va as refuseMalformedOutputsForDestroy, vc as resolveDockerContextDirectory, vi as carriesDynamicReference, vl as absoluteAssemblyPathEscape, vn as carriedExportAliasExposure, vo as templateResourceTypes, vr as readsNoEchoDeleteValues, vs as recordMaskOnlyValuesIn, vt as displacedPhysicalIdShown, w as deferredServiceTokenWarning, wa as refuseMalformedResourceEntriesForImportSave, wc as formatDockerLoginError, wi as isStalePlaceholderArnAttribute, wl as resolveBucketRegion, wn as collectPublishedOutputNames, wo as DagBuilder, wr as customResourceResponseExpirationWarning, ws as STATE_SOURCED_CROSS_GENERATION_RULES, wt as revertedNestedRowIds, xa as refuseMalformedResourceEntriesForDeploy, xc as describeDockerFailure, xi as keepsSecretReferenceToken, xl as renderAssemblyPathEscape, xn as isWholeDynamicReferenceValue, xr as withPrintingSecrets, xs as recordProvenPublicExpression, xt as nestedChildStackName$1, ya as refuseMalformedResourceAttributesForOrphan, yc as describeDockerCapturedOutput, yi as carriesFetchableDynamicReference, yl as describeFileReadFailure, yn as exportNameNoEchoParameters, yo as describeTypeWithThrottleRetry, yr as isCustomResourceType$1, ys as recordNoEchoAttributeValues, yt as dropSettledNestedJournals, za as repairMalformedResourcesForReadOnly, zc as synthesisStatusMessage, zi as hasReadableOrphans, zn as ATOMIC_FINAL_SNAPSHOT_TYPES, zo as liveMatchesUnresolvedTokenFrame, zs as splitImportedOps, zt as destroyStackRecordsView } from "./deploy-engine-A-Ys_mhE.js";
|
|
6
|
+
import { t as getCdkdVersion } from "./version-CItAaDXu.js";
|
|
7
7
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
9
9
|
import { GetRoleCommand, GetUserCommand } from "@aws-sdk/client-iam";
|
|
@@ -1921,18 +1921,15 @@ function refuseMalformedNestedTemplateTrees(stacks) {
|
|
|
1921
1921
|
const REQUIRE_APPROVAL_VALUES = [
|
|
1922
1922
|
"never",
|
|
1923
1923
|
"any-change",
|
|
1924
|
+
"broadening",
|
|
1924
1925
|
"destructive"
|
|
1925
1926
|
];
|
|
1926
|
-
const requireApprovalOption = new Option("--require-approval <level>", "What changes require manual approval before they are deployed: \"never\" (default), \"any-change\", or \"destructive\" (a change that replaces, deletes or orphans an existing resource
|
|
1927
|
-
function resolveRequireApproval(cliValue,
|
|
1927
|
+
const requireApprovalOption = new Option("--require-approval <level>", "What changes require manual approval before they are deployed: \"never\" (default), \"any-change\", \"broadening\" (a change that broadens IAM permissions or security-group rules), or \"destructive\" (a change that replaces, deletes or orphans an existing resource). Both \"broadening\" and \"destructive\" check nested stacks too. Without a terminal the deploy fails instead of asking, unless --yes is given. Also read from \"requireApproval\" in cdk.json.").choices(REQUIRE_APPROVAL_VALUES);
|
|
1928
|
+
function resolveRequireApproval(cliValue, cdkJson = loadCdkJson()) {
|
|
1928
1929
|
if (cliValue !== void 0) return cliValue;
|
|
1929
1930
|
const configured = cdkJson?.requireApproval;
|
|
1930
1931
|
if (configured === void 0) return "never";
|
|
1931
1932
|
if (REQUIRE_APPROVAL_VALUES.includes(configured)) return configured;
|
|
1932
|
-
if (configured === "broadening") {
|
|
1933
|
-
logger.warn(`cdk.json "requireApproval": "broadening" is ignored: cdkd does not detect security-broadening changes, so no approval is asked. Use "any-change" or "destructive" to have cdkd ask.`);
|
|
1934
|
-
return "never";
|
|
1935
|
-
}
|
|
1936
1933
|
throw new CdkdError(`cdk.json "requireApproval" must be one of ${REQUIRE_APPROVAL_VALUES.join(", ")}, got: ${displayIdent(typeof configured === "string" ? configured : JSON.stringify(configured))}`, "INVALID_REQUIRE_APPROVAL");
|
|
1937
1934
|
}
|
|
1938
1935
|
function createApprovalPrompter(options) {
|
|
@@ -1949,14 +1946,18 @@ function createApprovalPrompter(options) {
|
|
|
1949
1946
|
}
|
|
1950
1947
|
function renderApprovalRequest(request) {
|
|
1951
1948
|
const lines = [""];
|
|
1952
|
-
if (request.
|
|
1949
|
+
if (request.securityChanges !== void 0 && request.securityChanges !== "") {
|
|
1950
|
+
lines.push(request.securityChanges.replace(/\n+$/, ""));
|
|
1951
|
+
lines.push("");
|
|
1952
|
+
}
|
|
1953
|
+
if (request.destructiveChanges.length > 0 && request.level !== "broadening") {
|
|
1953
1954
|
lines.push("Destructive changes:");
|
|
1954
1955
|
for (const change of request.destructiveChanges) lines.push(` ${formatDestructiveChange(change)}`);
|
|
1955
1956
|
lines.push("");
|
|
1956
1957
|
}
|
|
1957
1958
|
const { create, update, delete: del } = request.counts;
|
|
1958
1959
|
lines.push(request.outputsOnly ? `Stack ${displayIdent(request.stackName)}: no resource changes; its Outputs change.` : `Stack ${displayIdent(request.stackName)}: ${create} to create, ${update} to update, ${del} to delete.`);
|
|
1959
|
-
lines.push(request.level === "destructive" ? `Stack includes destructive updates and "--require-approval" is set to 'destructive'.` : `Stack includes updates and "--require-approval" is set to 'any-change'.`);
|
|
1960
|
+
lines.push(request.level === "destructive" ? `Stack includes destructive updates and "--require-approval" is set to 'destructive'.` : request.level === "broadening" ? `Stack includes security-sensitive updates and "--require-approval" is set to 'broadening'.` : `Stack includes updates and "--require-approval" is set to 'any-change'.`);
|
|
1960
1961
|
return `${lines.join("\n")}\n`;
|
|
1961
1962
|
}
|
|
1962
1963
|
|
|
@@ -2375,12 +2376,13 @@ function inferCrossStackStackDeps(stacks, opts) {
|
|
|
2375
2376
|
const result = /* @__PURE__ */ new Map();
|
|
2376
2377
|
for (const stack of stacks) {
|
|
2377
2378
|
const producers = /* @__PURE__ */ new Set();
|
|
2378
|
-
|
|
2379
|
+
collectTemplateCrossStackRefs(stack.template, (kind, value, unconditional) => {
|
|
2379
2380
|
let producer;
|
|
2380
2381
|
if (kind === "ImportValue") {
|
|
2381
2382
|
if (!wantImportValue) return;
|
|
2382
2383
|
if (typeof value === "string") producer = exportOwner.get(value);
|
|
2383
2384
|
} else {
|
|
2385
|
+
if (opts?.onRoleArnReference && unconditional && value && typeof value === "object" && !Array.isArray(value) && Object.hasOwn(value, "RoleArn")) opts.onRoleArnReference(stack.stackName, value);
|
|
2384
2386
|
if (!wantGetStackOutput) return;
|
|
2385
2387
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
2386
2388
|
const sn = value["StackName"];
|
|
@@ -2393,23 +2395,45 @@ function inferCrossStackStackDeps(stacks, opts) {
|
|
|
2393
2395
|
}
|
|
2394
2396
|
return result;
|
|
2395
2397
|
}
|
|
2396
|
-
function
|
|
2398
|
+
function collectTemplateCrossStackRefs(template, onRef) {
|
|
2399
|
+
if (!template || typeof template !== "object" || Array.isArray(template)) {
|
|
2400
|
+
collectCrossStackRefs(template, onRef, false);
|
|
2401
|
+
return;
|
|
2402
|
+
}
|
|
2403
|
+
for (const [section, body] of Object.entries(template)) {
|
|
2404
|
+
if (section !== "Resources" || !body || typeof body !== "object" || Array.isArray(body)) {
|
|
2405
|
+
collectCrossStackRefs(body, onRef, false);
|
|
2406
|
+
continue;
|
|
2407
|
+
}
|
|
2408
|
+
for (const resource of Object.values(body)) {
|
|
2409
|
+
if (!resource || typeof resource !== "object" || Array.isArray(resource)) {
|
|
2410
|
+
collectCrossStackRefs(resource, onRef, false);
|
|
2411
|
+
continue;
|
|
2412
|
+
}
|
|
2413
|
+
const record = resource;
|
|
2414
|
+
const always = !Object.hasOwn(record, "Condition");
|
|
2415
|
+
for (const [key, value] of Object.entries(record)) collectCrossStackRefs(value, onRef, always && key === "Properties");
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
function collectCrossStackRefs(node, onRef, unconditional) {
|
|
2397
2420
|
if (!node || typeof node !== "object") return;
|
|
2398
2421
|
if (Array.isArray(node)) {
|
|
2399
|
-
for (const item of node) collectCrossStackRefs(item, onRef);
|
|
2422
|
+
for (const item of node) collectCrossStackRefs(item, onRef, unconditional);
|
|
2400
2423
|
return;
|
|
2401
2424
|
}
|
|
2402
2425
|
const obj = node;
|
|
2403
|
-
if ("Fn::ImportValue" in obj) onRef("ImportValue", obj["Fn::ImportValue"]);
|
|
2404
|
-
if ("Fn::GetStackOutput" in obj) onRef("GetStackOutput", obj["Fn::GetStackOutput"]);
|
|
2405
|
-
|
|
2426
|
+
if ("Fn::ImportValue" in obj) onRef("ImportValue", obj["Fn::ImportValue"], unconditional);
|
|
2427
|
+
if ("Fn::GetStackOutput" in obj) onRef("GetStackOutput", obj["Fn::GetStackOutput"], unconditional);
|
|
2428
|
+
const below = unconditional && !("Fn::If" in obj);
|
|
2429
|
+
for (const value of Object.values(obj)) collectCrossStackRefs(value, onRef, below);
|
|
2406
2430
|
}
|
|
2407
2431
|
|
|
2408
2432
|
//#endregion
|
|
2409
2433
|
//#region src/provisioning/register-providers.ts
|
|
2410
2434
|
let providerClasses;
|
|
2411
2435
|
function loadProviderClasses() {
|
|
2412
|
-
providerClasses ??= import("./provider-classes-
|
|
2436
|
+
providerClasses ??= import("./provider-classes-CuZ-P4gB.js");
|
|
2413
2437
|
return providerClasses;
|
|
2414
2438
|
}
|
|
2415
2439
|
function registerAllProviders(registry, classes) {
|
|
@@ -2919,7 +2943,7 @@ async function deployCommand(stacks, options) {
|
|
|
2919
2943
|
validateResourceTimeouts(options);
|
|
2920
2944
|
setResolvedResourceTimeouts(options.resourceTimeout);
|
|
2921
2945
|
applyWaitFlagEnv(options);
|
|
2922
|
-
const requireApproval = resolveRequireApproval(options.requireApproval
|
|
2946
|
+
const requireApproval = resolveRequireApproval(options.requireApproval);
|
|
2923
2947
|
const approveDeployment = requireApproval !== "never" && !options.dryRun ? createApprovalPrompter({ yes: options.yes ?? false }) : void 0;
|
|
2924
2948
|
const rawBaseRegion = rawCliRegion(options.region) ?? "us-east-1";
|
|
2925
2949
|
foldRegionOption(options);
|
|
@@ -3016,7 +3040,12 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
3016
3040
|
const gone = stacksNoLongerSelected(allStacks, stackPatterns, /* @__PURE__ */ new Set());
|
|
3017
3041
|
throw new Error(renderNoStackMatch(stackPatterns, allStacks) + (gone.stacks.length > 0 ? `\n${renderStacksNoLongerSelected(gone.patterns, gone.stacks)}` : ""));
|
|
3018
3042
|
}
|
|
3019
|
-
const
|
|
3043
|
+
const roleArnReferences = [];
|
|
3044
|
+
const inferredCrossStackDeps = inferCrossStackStackDeps(allStacks, { onRoleArnReference: (consumer, args) => roleArnReferences.push({
|
|
3045
|
+
consumer,
|
|
3046
|
+
args
|
|
3047
|
+
}) });
|
|
3048
|
+
const producerLookup = producerLookupOver(allStacks);
|
|
3020
3049
|
const effectiveStackDeps = (stackName, deps) => {
|
|
3021
3050
|
const union = new Set(deps);
|
|
3022
3051
|
for (const producer of inferredCrossStackDeps.get(stackName) ?? []) union.add(producer);
|
|
@@ -3058,6 +3087,13 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
3058
3087
|
ignoreErrors: options.ignoreErrors === true
|
|
3059
3088
|
});
|
|
3060
3089
|
refuseMalformedNestedTemplateTrees(targetStacks);
|
|
3090
|
+
if (roleArnReferences.length > 0) {
|
|
3091
|
+
const stackByName = new Map(allStacks.map((s) => [s.stackName, s]));
|
|
3092
|
+
refuseUnreadableCdkCrossAccountRefs(roleArnReferences, new Set(targetStacks.map((s) => s.stackName)), (name) => ({
|
|
3093
|
+
region: stackByName.get(name)?.region ?? namedCliRegion(options.region),
|
|
3094
|
+
account: stackByName.get(name)?.account
|
|
3095
|
+
}), producerLookup);
|
|
3096
|
+
}
|
|
3061
3097
|
const baseRegion = namedCliRegion(options.region) ?? "us-east-1";
|
|
3062
3098
|
const crossPrefixGuard = new CrossPrefixGuard(preflightStateBackend, { readOnly: options.dryRun === true });
|
|
3063
3099
|
await synthesizer.expandMacrosForStacks(targetStacks, synthOptions);
|
|
@@ -3283,6 +3319,8 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
3283
3319
|
finalSnapshotClients: stackAwsClients,
|
|
3284
3320
|
...options.strictGetatt && { strictGetAtt: true },
|
|
3285
3321
|
...options.cfnFallback === false && { cfnFallback: false },
|
|
3322
|
+
producerLookup,
|
|
3323
|
+
...stackInfo.account && { consumerAccount: stackInfo.account },
|
|
3286
3324
|
captureObservedState: resolveCaptureObservedState(options.captureObservedState),
|
|
3287
3325
|
...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
|
|
3288
3326
|
...options.resourceTimeout?.globalMs !== void 0 && { resourceTimeoutMs: options.resourceTimeout.globalMs },
|
|
@@ -4662,10 +4700,14 @@ function maskOutputChangeForDisplay(change, mask, nameCorpus) {
|
|
|
4662
4700
|
return changed ? shown : change;
|
|
4663
4701
|
}
|
|
4664
4702
|
async function computeStackDiff(currentState, template, region, stackName, stateBackend, diffCalculator, options = {}) {
|
|
4665
|
-
const { parameters, canonicalizeProperties, cfnFallback, inheritSecretBearingTemplate, inheritedSecrets, inheritedDerivedNames, attributeHealer, parentUnresolvedParameters, inheritedNoEchoParameters, inheritedNoEchoParametersAnyVerdict } = options;
|
|
4703
|
+
const { parameters, canonicalizeProperties, cfnFallback, producerLookup, consumerAccount, inheritSecretBearingTemplate, inheritedSecrets, inheritedDerivedNames, attributeHealer, parentUnresolvedParameters, inheritedNoEchoParameters, inheritedNoEchoParametersAnyVerdict } = options;
|
|
4666
4704
|
const noEchoParametersOf = (t) => /* @__PURE__ */ new Set([...noEchoParameterNamesOf(t), ...inheritedNoEchoParameters ?? []]);
|
|
4667
4705
|
const inheritedForResolver = inheritedSecrets !== void 0 && hasMaskableValues(inheritedSecrets) ? inheritedSecrets : void 0;
|
|
4668
|
-
const intrinsicResolver = new IntrinsicFunctionResolver(region, {
|
|
4706
|
+
const intrinsicResolver = new IntrinsicFunctionResolver(region, {
|
|
4707
|
+
cfnFallback: cfnFallback ?? true,
|
|
4708
|
+
...producerLookup && { producerLookup },
|
|
4709
|
+
...consumerAccount && { consumerAccount }
|
|
4710
|
+
});
|
|
4669
4711
|
const outputsDigestSource = structuredClone({
|
|
4670
4712
|
...template,
|
|
4671
4713
|
Resources: {}
|
|
@@ -4782,8 +4824,8 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
4782
4824
|
const diffSecrets = /* @__PURE__ */ new Map();
|
|
4783
4825
|
const splitPieces = /* @__PURE__ */ new Map();
|
|
4784
4826
|
const derivedNames = /* @__PURE__ */ new Map();
|
|
4785
|
-
const splitDelimiters = literalSplitDelimitersOf(template, new Set(Object.entries(template.Parameters ?? {}).filter(([, definition]) => definition
|
|
4786
|
-
for (const [name, definition] of Object.entries(template.Parameters ?? {})) if (definition
|
|
4827
|
+
const splitDelimiters = literalSplitDelimitersOf(template, new Set(Object.entries(template.Parameters ?? {}).filter(([, definition]) => declaresNoEcho(definition)).map(([name]) => name)));
|
|
4828
|
+
for (const [name, definition] of Object.entries(template.Parameters ?? {})) if (declaresNoEcho(definition) && mergedParameters !== void 0 && Object.prototype.hasOwnProperty.call(mergedParameters, name) && !isWholeDynamicReferenceValue(mergedParameters[name])) {
|
|
4787
4829
|
recordLogOnlyParameterValue(diffSecrets, mergedParameters[name]);
|
|
4788
4830
|
recordLogOnlyParameterValue(splitPieces, mergedParameters[name], splitDelimiters);
|
|
4789
4831
|
}
|
|
@@ -4997,6 +5039,13 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
4997
5039
|
}
|
|
4998
5040
|
return {
|
|
4999
5041
|
changes: shownChanges,
|
|
5042
|
+
securityDiff: () => diffSecurity({
|
|
5043
|
+
stackName,
|
|
5044
|
+
changes: changes.values(),
|
|
5045
|
+
records: stateForDiff.resources,
|
|
5046
|
+
template: effectiveTemplate,
|
|
5047
|
+
secretMask: () => printing.mask
|
|
5048
|
+
}),
|
|
5000
5049
|
outputChanges: shownOutputChanges,
|
|
5001
5050
|
adoptedOrphans,
|
|
5002
5051
|
adoptedRecords,
|
|
@@ -5180,10 +5229,14 @@ function noEchoFedChildParameters(parentStackRow, parentNoEchoParameters, parent
|
|
|
5180
5229
|
})) fed.add(name);
|
|
5181
5230
|
return fed;
|
|
5182
5231
|
}
|
|
5183
|
-
async function resolveChildStackParameters(parentStackRow, parentTemplate, parentState, region, parentStackName, stateBackend, parentParameters, parentConditions, cfnFallback, printingSecrets, attributeHealer, unresolvedKeys, trust, derivedNameSink) {
|
|
5232
|
+
async function resolveChildStackParameters(parentStackRow, parentTemplate, parentState, region, parentStackName, stateBackend, parentParameters, parentConditions, cfnFallback, printingSecrets, attributeHealer, unresolvedKeys, trust, derivedNameSink, producerLookup, consumerAccount) {
|
|
5184
5233
|
const rawParams = parentStackRow.Properties?.["Parameters"];
|
|
5185
5234
|
if (!rawParams || typeof rawParams !== "object" || Array.isArray(rawParams)) return {};
|
|
5186
|
-
const resolver = new IntrinsicFunctionResolver(region, {
|
|
5235
|
+
const resolver = new IntrinsicFunctionResolver(region, {
|
|
5236
|
+
cfnFallback: cfnFallback ?? true,
|
|
5237
|
+
...producerLookup && { producerLookup },
|
|
5238
|
+
...consumerAccount && { consumerAccount }
|
|
5239
|
+
});
|
|
5187
5240
|
const resolved = {};
|
|
5188
5241
|
for (const [name, value] of Object.entries(rawParams)) {
|
|
5189
5242
|
if (trust === void 0 || !rowValueTrusted(value, parentState, parentConditions, trust)) unresolvedKeys?.add(name);
|
|
@@ -5219,7 +5272,7 @@ function recordedTemplateResources(template, state) {
|
|
|
5219
5272
|
return recorded;
|
|
5220
5273
|
}
|
|
5221
5274
|
async function buildDiffTree(args) {
|
|
5222
|
-
const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, assetRedirect, cfnFallback, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, inheritedSecrets, inheritedDerivedNames, inheritedNoEchoParameters, inheritedNoEchoParametersAnyVerdict, refusalRecovery } = args;
|
|
5275
|
+
const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, assetRedirect, cfnFallback, producerLookup, consumerAccount, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, inheritedSecrets, inheritedDerivedNames, inheritedNoEchoParameters, inheritedNoEchoParametersAnyVerdict, refusalRecovery } = args;
|
|
5223
5276
|
const attributeHealer = attributeHealerFor?.(stackName, region);
|
|
5224
5277
|
const { state, unreadable, unreadableContainers, deployRefusals } = await loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery);
|
|
5225
5278
|
const createOnlyPrefetch = prefetchCreateOnlyPropertyPaths(templateResourceTypes(recordedTemplateResources(template, state)));
|
|
@@ -5231,6 +5284,8 @@ async function buildDiffTree(args) {
|
|
|
5231
5284
|
...parentUnresolvedParameters && { parentUnresolvedParameters },
|
|
5232
5285
|
...canonicalizeProperties && { canonicalizeProperties },
|
|
5233
5286
|
...cfnFallback !== void 0 && { cfnFallback },
|
|
5287
|
+
...producerLookup && { producerLookup },
|
|
5288
|
+
...consumerAccount && { consumerAccount },
|
|
5234
5289
|
...previewOrphanAdoption && { previewOrphanAdoption },
|
|
5235
5290
|
...inheritedSecrets && { inheritedSecrets },
|
|
5236
5291
|
...inheritedDerivedNames && { inheritedDerivedNames },
|
|
@@ -5245,7 +5300,7 @@ async function buildDiffTree(args) {
|
|
|
5245
5300
|
} finally {
|
|
5246
5301
|
createOnlyPrefetch.cancel();
|
|
5247
5302
|
}
|
|
5248
|
-
const { changes, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans, deployRefusals: adoptedDeployRefusals, effectiveTemplate, printingSecrets, derivedNames: nodeDerivedNames, secretNamedRecords: nodeStateNames, resolvedParameters, conditions, knownConditions, trust } = stackDiff;
|
|
5303
|
+
const { changes, securityDiff, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans, deployRefusals: adoptedDeployRefusals, effectiveTemplate, printingSecrets, derivedNames: nodeDerivedNames, secretNamedRecords: nodeStateNames, resolvedParameters, conditions, knownConditions, trust } = stackDiff;
|
|
5249
5304
|
const stateAfterAdoption = Object.keys(adoptedRecords).length > 0 ? {
|
|
5250
5305
|
...state,
|
|
5251
5306
|
resources: {
|
|
@@ -5258,6 +5313,7 @@ async function buildDiffTree(args) {
|
|
|
5258
5313
|
displayName,
|
|
5259
5314
|
region,
|
|
5260
5315
|
changes,
|
|
5316
|
+
securityDiff,
|
|
5261
5317
|
ccApiRoutes: collectCcApiRoutes(effectiveTemplate, stateAfterAdoption, changes),
|
|
5262
5318
|
outputChanges,
|
|
5263
5319
|
adoptedOrphans,
|
|
@@ -5295,7 +5351,7 @@ async function buildDiffTree(args) {
|
|
|
5295
5351
|
...inheritedNoEchoParametersAnyVerdict ?? []
|
|
5296
5352
|
]), void 0, stateAfterAdoption.resources);
|
|
5297
5353
|
const rowDerivedNames = /* @__PURE__ */ new Map();
|
|
5298
|
-
const childParameters = await resolveChildStackParameters(resource, effectiveTemplate, stateAfterAdoption, region, stackName, stateBackend, resolvedParameters, conditions, cfnFallback, printingSecrets, attributeHealer, childUnresolvedParameters, trust, rowDerivedNames);
|
|
5354
|
+
const childParameters = await resolveChildStackParameters(resource, effectiveTemplate, stateAfterAdoption, region, stackName, stateBackend, resolvedParameters, conditions, cfnFallback, printingSecrets, attributeHealer, childUnresolvedParameters, trust, rowDerivedNames, producerLookup, consumerAccount);
|
|
5299
5355
|
const childDerivedNames = diffPrintingSecrets([
|
|
5300
5356
|
inheritedDerivedNames,
|
|
5301
5357
|
rowDerivedNames,
|
|
@@ -5315,6 +5371,8 @@ async function buildDiffTree(args) {
|
|
|
5315
5371
|
...canonicalizeProperties && { canonicalizeProperties },
|
|
5316
5372
|
...assetRedirect && { assetRedirect },
|
|
5317
5373
|
...cfnFallback !== void 0 && { cfnFallback },
|
|
5374
|
+
...producerLookup && { producerLookup },
|
|
5375
|
+
...consumerAccount && { consumerAccount },
|
|
5318
5376
|
...previewOrphanAdoption && { previewOrphanAdoption },
|
|
5319
5377
|
...attributeHealerFor && { attributeHealerFor },
|
|
5320
5378
|
ancestorTemplatePaths: childAncestorTemplatePaths,
|
|
@@ -5342,7 +5400,7 @@ async function buildDiffTree(args) {
|
|
|
5342
5400
|
async function buildDeletedSubtree(stackName, region, stateBackend, diffCalculator, parentHasSecretReference, inheritedSecrets, refusalRecovery, inheritedDerivedNames) {
|
|
5343
5401
|
const { state, unreadable, unreadableContainers } = await loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery);
|
|
5344
5402
|
const derivedNames = diffPrintingSecrets([inheritedDerivedNames, stateDerivedNames(state.resources ?? {})]);
|
|
5345
|
-
const { changes, outputChanges } = await computeStackDiff(state, EMPTY_TEMPLATE, region, stackName, stateBackend, diffCalculator, {
|
|
5403
|
+
const { changes, securityDiff, outputChanges } = await computeStackDiff(state, EMPTY_TEMPLATE, region, stackName, stateBackend, diffCalculator, {
|
|
5346
5404
|
inheritSecretBearingTemplate: parentHasSecretReference,
|
|
5347
5405
|
inheritedSecrets,
|
|
5348
5406
|
...hasMaskableValues(derivedNames) && { inheritedDerivedNames: derivedNames },
|
|
@@ -5353,6 +5411,7 @@ async function buildDeletedSubtree(stackName, region, stateBackend, diffCalculat
|
|
|
5353
5411
|
displayName: stackName,
|
|
5354
5412
|
region,
|
|
5355
5413
|
changes,
|
|
5414
|
+
securityDiff,
|
|
5356
5415
|
ccApiRoutes: /* @__PURE__ */ new Map(),
|
|
5357
5416
|
adoptedOrphans: [],
|
|
5358
5417
|
blocking: [],
|
|
@@ -5649,9 +5708,20 @@ function renderDiffTree(node, isRoot, logFn) {
|
|
|
5649
5708
|
|
|
5650
5709
|
//#endregion
|
|
5651
5710
|
//#region src/cli/commands/diff.ts
|
|
5711
|
+
function treeNodes(node) {
|
|
5712
|
+
return [node, ...node.children.flatMap(treeNodes)];
|
|
5713
|
+
}
|
|
5714
|
+
function securityDiffOf(node) {
|
|
5715
|
+
if (node.securityDiff === void 0) throw new CdkdError(safeMsg`No security diff for stack ${node.displayName}; its security changes cannot be decided.`, "SECURITY_DIFF_FAILED");
|
|
5716
|
+
return node.securityDiff();
|
|
5717
|
+
}
|
|
5718
|
+
function logTable(rendered, log) {
|
|
5719
|
+
for (const row of rendered.replace(/\n+$/, "").split("\n")) log(safeMsg`${row}`);
|
|
5720
|
+
}
|
|
5652
5721
|
const DIFF_FAIL_ON_VALUES = [
|
|
5653
5722
|
"never",
|
|
5654
5723
|
"any-change",
|
|
5724
|
+
"broadening",
|
|
5655
5725
|
"destructive"
|
|
5656
5726
|
];
|
|
5657
5727
|
function parseFailOn(value, previous) {
|
|
@@ -5682,6 +5752,8 @@ var DeployRefusalPreviewError = class DeployRefusalPreviewError extends CdkdErro
|
|
|
5682
5752
|
};
|
|
5683
5753
|
async function diffCommand(stacks, options) {
|
|
5684
5754
|
const failOn = resolveFailOn(options);
|
|
5755
|
+
const securityOnly = options.securityOnly === true;
|
|
5756
|
+
if (securityOnly && options.json === true) throw new CdkdError("--security-only cannot be used with --json: it prints the security tables only", "INCOMPATIBLE_OPTIONS");
|
|
5685
5757
|
const providerClasses = await loadProviderClasses();
|
|
5686
5758
|
const logger = getLogger();
|
|
5687
5759
|
if (options.json) logger.setLevel("warn");
|
|
@@ -5808,7 +5880,7 @@ async function diffCommand(stacks, options) {
|
|
|
5808
5880
|
}).provider,
|
|
5809
5881
|
inRegion: (healRegion, fn) => runWithStackAwsClients(stackRegionScope(healRegion).clients, fn)
|
|
5810
5882
|
});
|
|
5811
|
-
const recursive = (options.recursive ?? false) || failOn === "destructive";
|
|
5883
|
+
const recursive = (options.recursive ?? false) || failOn === "destructive" || failOn === "broadening" || securityOnly;
|
|
5812
5884
|
const resolveAssetRedirect = createAssetRedirectResolver({
|
|
5813
5885
|
stateBackend,
|
|
5814
5886
|
stsRegion: region,
|
|
@@ -5817,6 +5889,7 @@ async function diffCommand(stacks, options) {
|
|
|
5817
5889
|
suppressLegacyNotice: true
|
|
5818
5890
|
});
|
|
5819
5891
|
const trees = [];
|
|
5892
|
+
const producerLookup = producerLookupOver(allStacks);
|
|
5820
5893
|
for (const stackInfo of targetStacks) {
|
|
5821
5894
|
logger.info(`\nCalculating diff for stack: ${stackInfo.stackName}`);
|
|
5822
5895
|
const stackRegion = stackInfo.region || region;
|
|
@@ -5837,13 +5910,41 @@ async function diffCommand(stacks, options) {
|
|
|
5837
5910
|
canonicalizeProperties,
|
|
5838
5911
|
...assetRedirect && { assetRedirect },
|
|
5839
5912
|
...options.cfnFallback === false && { cfnFallback: false },
|
|
5913
|
+
producerLookup,
|
|
5914
|
+
...stackInfo.account && { consumerAccount: stackInfo.account },
|
|
5840
5915
|
previewOrphanAdoption,
|
|
5841
5916
|
attributeHealerFor,
|
|
5842
5917
|
isNestedChild: false,
|
|
5843
5918
|
refusalRecovery
|
|
5844
5919
|
}));
|
|
5845
5920
|
}
|
|
5846
|
-
|
|
5921
|
+
let securityDifferences = 0;
|
|
5922
|
+
let securityBroadening = false;
|
|
5923
|
+
if (securityOnly) for (const tree of trees) {
|
|
5924
|
+
const nodes = treeNodes(tree);
|
|
5925
|
+
for (const node of nodes) for (const reason of node.blocking) logger.error(safeMsg`Blocking (${node.displayName}): ${reason}`);
|
|
5926
|
+
const results = [];
|
|
5927
|
+
for (const node of nodes) results.push({
|
|
5928
|
+
node,
|
|
5929
|
+
security: await securityDiffOf(node)
|
|
5930
|
+
});
|
|
5931
|
+
if (!results.some(({ security }) => security.broadening)) {
|
|
5932
|
+
logger.info(safeMsg`\n✓ No security-broadening changes for stack ${tree.displayName}`);
|
|
5933
|
+
continue;
|
|
5934
|
+
}
|
|
5935
|
+
securityBroadening = true;
|
|
5936
|
+
securityDifferences += results.filter(({ security }) => security.rendered !== "").length;
|
|
5937
|
+
logger.warn("This deployment will make potentially sensitive changes according to your current security approval level.\nPlease confirm you intend to make the following modifications:\n");
|
|
5938
|
+
for (const { node, security } of results) {
|
|
5939
|
+
logger.info(safeMsg`Stack ${node.displayName}`);
|
|
5940
|
+
if (security.rendered === "") {
|
|
5941
|
+
logger.info("There were no security-related changes (limitations: https://github.com/aws/aws-cdk/issues/1299)");
|
|
5942
|
+
continue;
|
|
5943
|
+
}
|
|
5944
|
+
logTable(security.rendered, (row) => logger.info(row));
|
|
5945
|
+
}
|
|
5946
|
+
}
|
|
5947
|
+
else if (options.json) process.stdout.write(`${stringifyJsonPayload(trees.map(diffTreeToJson))}\n`);
|
|
5847
5948
|
else for (const tree of trees) {
|
|
5848
5949
|
if (!treeIsWorthRendering(tree)) {
|
|
5849
5950
|
logger.info(`\n✓ No changes detected for stack ${tree.stackName}`);
|
|
@@ -5853,7 +5954,7 @@ async function diffCommand(stacks, options) {
|
|
|
5853
5954
|
}
|
|
5854
5955
|
const blockingCount = trees.reduce((n, tree) => n + countBlocking(tree), 0);
|
|
5855
5956
|
if (blockingCount > 0) throw new DeployRefusalPreviewError(blockingCount);
|
|
5856
|
-
if (failOn === "any-change" && trees.some(treeHasChanges)) throw new DiffDetectedError();
|
|
5957
|
+
if (failOn === "any-change" && (securityOnly ? securityDifferences > 0 : trees.some(treeHasChanges))) throw new DiffDetectedError();
|
|
5857
5958
|
if (failOn === "destructive") {
|
|
5858
5959
|
const destructive = trees.flatMap(treeDestructiveChanges);
|
|
5859
5960
|
if (destructive.length > 0) {
|
|
@@ -5862,13 +5963,26 @@ async function diffCommand(stacks, options) {
|
|
|
5862
5963
|
throw new DiffDetectedError();
|
|
5863
5964
|
}
|
|
5864
5965
|
}
|
|
5966
|
+
if (failOn === "broadening" && securityOnly) {
|
|
5967
|
+
if (securityBroadening) throw new DiffDetectedError();
|
|
5968
|
+
} else if (failOn === "broadening") {
|
|
5969
|
+
let broadening = 0;
|
|
5970
|
+
for (const node of trees.flatMap(treeNodes)) {
|
|
5971
|
+
const security = await securityDiffOf(node);
|
|
5972
|
+
if (!security.broadening) continue;
|
|
5973
|
+
broadening++;
|
|
5974
|
+
logger.error(safeMsg`\n❌ Stack ${node.displayName} broadens permissions (--fail-on=broadening):`);
|
|
5975
|
+
logTable(security.rendered, (row) => logger.error(row));
|
|
5976
|
+
}
|
|
5977
|
+
if (broadening > 0) throw new DiffDetectedError();
|
|
5978
|
+
}
|
|
5865
5979
|
} finally {
|
|
5866
5980
|
for (const { clients } of stackRegionScopes.values()) clients.destroy();
|
|
5867
5981
|
awsClients.destroy();
|
|
5868
5982
|
}
|
|
5869
5983
|
}
|
|
5870
5984
|
function createDiffCommand() {
|
|
5871
|
-
const cmd = new Command("diff").description("Show difference between current state and desired state").argument("[stacks...]", "Stack name(s) to diff. Accepts CDK display paths (e.g. 'MyStage/Api') with wildcards ('MyStage/*', '**'), or exact physical CloudFormation names (e.g. 'MyStage-Api').").option("--all", "Diff every top-level stack (top-level only; Stage stacks: '**')", false).option("--recursive", "Recurse into each AWS::CloudFormation::Stack row and diff every nested-stack child against its own deployed state (DFS order). Default is non-recursive, matching cdk diff.", false).option("--fail", "Exit with code 1 when any change is detected (matches cdk diff --fail). Alias for --fail-on=any-change.").option("--no-fail", "Never exit with code 1 for a change. Alias for --fail-on=never.").addOption(new Option("--fail-on <kind>", "Exit with code 1 when the diff contains the given kind of change: \"any-change\" fails on any difference, \"destructive\" only on changes that replace, delete or orphan a resource, \"never\" does not fail (default). \"destructive\" always
|
|
5985
|
+
const cmd = new Command("diff").description("Show difference between current state and desired state").argument("[stacks...]", "Stack name(s) to diff. Accepts CDK display paths (e.g. 'MyStage/Api') with wildcards ('MyStage/*', '**'), or exact physical CloudFormation names (e.g. 'MyStage-Api').").option("--all", "Diff every top-level stack (top-level only; Stage stacks: '**')", false).option("--recursive", "Recurse into each AWS::CloudFormation::Stack row and diff every nested-stack child against its own deployed state (DFS order). Default is non-recursive, matching cdk diff.", false).option("--fail", "Exit with code 1 when any change is detected (matches cdk diff --fail). Alias for --fail-on=any-change.").option("--no-fail", "Never exit with code 1 for a change. Alias for --fail-on=never.").addOption(new Option("--fail-on <kind>", "Exit with code 1 when the diff contains the given kind of change: \"any-change\" fails on any difference, \"broadening\" only on changes that broaden IAM permissions or security-group rules, \"destructive\" only on changes that replace, delete or orphan a resource, \"never\" does not fail (default). \"broadening\" and \"destructive\" always check nested stacks (as --recursive); \"any-change\" does with --recursive. Cannot be used with --fail / --no-fail.").choices(DIFF_FAIL_ON_VALUES).argParser(parseFailOn)).option("--security-only", "Only print the security changes (IAM and security-group) of each stack whose changes broaden permissions, and count only those stacks as differences for --fail-on (matches cdk diff --security-only). Checks nested stacks too. Cannot be used with --json.").option("--json", "Output the diff as JSON (nested tree shape when combined with --recursive)", false).addOption(useCdkBootstrapAssetsOption).addOption(noCfnFallbackOption).action(withErrorHandling(diffCommand));
|
|
5872
5986
|
[
|
|
5873
5987
|
...commonOptions,
|
|
5874
5988
|
...appOptions,
|
|
@@ -7618,7 +7732,8 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
7618
7732
|
...recordedSecretValues && { recordedSecretValues },
|
|
7619
7733
|
producerRegions,
|
|
7620
7734
|
bestEffort: true,
|
|
7621
|
-
...inheritedSecrets && { inheritedSecrets }
|
|
7735
|
+
...inheritedSecrets && { inheritedSecrets },
|
|
7736
|
+
...nestedInput && copiesOfParentRow(nestedInput.inheritedSecrets)
|
|
7622
7737
|
});
|
|
7623
7738
|
const resolveCrossStackReads = makeCrossStackPrePass({
|
|
7624
7739
|
stackName: stack.stackName,
|
|
@@ -8306,6 +8421,10 @@ function noEchoFilledRowParameters(rowProperties, sources, needleSources) {
|
|
|
8306
8421
|
conditional
|
|
8307
8422
|
};
|
|
8308
8423
|
}
|
|
8424
|
+
function copiesOfParentRow(bag) {
|
|
8425
|
+
const copies = physicalNameCopiesOf.get(bag);
|
|
8426
|
+
return copies === void 0 || copies.size === 0 ? {} : { inheritedPhysicalNameCopies: copies };
|
|
8427
|
+
}
|
|
8309
8428
|
|
|
8310
8429
|
//#endregion
|
|
8311
8430
|
//#region src/analyzer/drift-normalize.ts
|
|
@@ -9959,7 +10078,7 @@ async function runAccept(reports, stateBackend, stateConfig, awsClients, options
|
|
|
9959
10078
|
setAtPath(newBaseline, change.path, change.awsValue);
|
|
9960
10079
|
accepted.push(change);
|
|
9961
10080
|
}
|
|
9962
|
-
const redactedBaseline = redactSecretsForState(newBaseline, outcome.secrets, existing.properties ?? {}, hasObserved ? STATE_SOURCED_BASELINE_RULES : STATE_SOURCED_READBACK_RULES);
|
|
10081
|
+
const redactedBaseline = withPhysicalNameCopies(outcome.secrets, otherPhysicalIds(report.state.resources, outcome.logicalId), () => redactSecretsForState(newBaseline, outcome.secrets, existing.properties ?? {}, hasObserved ? STATE_SOURCED_BASELINE_RULES : STATE_SOURCED_READBACK_RULES));
|
|
9963
10082
|
let recordedChanges = 0;
|
|
9964
10083
|
for (const change of accepted) {
|
|
9965
10084
|
if (deepEqualUnordered(getAtPath(redactedBaseline, change.path), change.awsValue)) {
|
|
@@ -10452,6 +10571,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
10452
10571
|
provisionedBy: stateResource.provisionedBy
|
|
10453
10572
|
}).provider;
|
|
10454
10573
|
const secrets = /* @__PURE__ */ new Map();
|
|
10574
|
+
for (const id of otherPhysicalIds(report.state.resources, outcome.logicalId)) recordPhysicalNameCopy(secrets, id);
|
|
10455
10575
|
const revertBaseline = stateResource.observedProperties ?? stateResource.properties ?? {};
|
|
10456
10576
|
const unresolvedTokens = /* @__PURE__ */ new Set();
|
|
10457
10577
|
const noteUnresolved = (tokens) => {
|
|
@@ -10998,6 +11118,11 @@ function maskMarkedNoEchoBaselineWithLeaves(baseline, record, observed) {
|
|
|
10998
11118
|
...widened.length > 0 && { noEchoLeaves: canonicalCoordinates([...marked, ...widened]) }
|
|
10999
11119
|
};
|
|
11000
11120
|
}
|
|
11121
|
+
function otherPhysicalIds(resources, logicalId) {
|
|
11122
|
+
const ids = [];
|
|
11123
|
+
for (const [id, record] of Object.entries(resources ?? {})) if (id !== logicalId && typeof record?.physicalId === "string") ids.push(record.physicalId);
|
|
11124
|
+
return ids;
|
|
11125
|
+
}
|
|
11001
11126
|
|
|
11002
11127
|
//#endregion
|
|
11003
11128
|
//#region src/cli/commands/stack-lock-guard.ts
|
|
@@ -11156,6 +11281,7 @@ function holdsSecretDerivedPrincipalRecord(resource) {
|
|
|
11156
11281
|
|
|
11157
11282
|
//#endregion
|
|
11158
11283
|
//#region src/cli/commands/destroy-runner.ts
|
|
11284
|
+
const NOECHO_PRINTING_BIND_CAP_MS = 1e4;
|
|
11159
11285
|
const NESTED_STACK_TYPE = "AWS::CloudFormation::Stack";
|
|
11160
11286
|
function recordDestroyEvent(recorder, event) {
|
|
11161
11287
|
recorder?.record(maskEventTextWithBoundBags(event));
|
|
@@ -11284,15 +11410,37 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
11284
11410
|
logger.info(`\nResources to be deleted (${resourceCount}):`);
|
|
11285
11411
|
for (const [logicalId, resource] of Object.entries(state.resources)) logger.info(` - ${displaySafe(logicalId)} (${displaySafe(resource.resourceType)})`);
|
|
11286
11412
|
const protectedCount = ctx.removeProtection ? countProtectedResources(state) + countProtectedJournaledOrphans(journaledOrphans, state.region) : 0;
|
|
11413
|
+
let binding;
|
|
11414
|
+
const stackNoEchoValues = () => {
|
|
11415
|
+
if (binding === void 0) {
|
|
11416
|
+
let timer;
|
|
11417
|
+
const capped = new Promise((resolve) => {
|
|
11418
|
+
timer = setTimeout(() => {
|
|
11419
|
+
logger.warn(safeMsg`The stack's NoEcho values were not bound within ${NOECHO_PRINTING_BIND_CAP_MS / 1e3}s, ` + "so a resource name taken from one may print unmasked where state holds it in plaintext (state written before schema v11).");
|
|
11420
|
+
resolve(void 0);
|
|
11421
|
+
}, NOECHO_PRINTING_BIND_CAP_MS);
|
|
11422
|
+
timer.unref?.();
|
|
11423
|
+
});
|
|
11424
|
+
binding = {
|
|
11425
|
+
bound: Promise.resolve().then(() => ctx.noEchoReresolver?.printingNoEchoValues()).catch(() => void 0).finally(() => clearTimeout(timer)),
|
|
11426
|
+
capped
|
|
11427
|
+
};
|
|
11428
|
+
}
|
|
11429
|
+
return Promise.race([binding.bound, binding.capped]);
|
|
11430
|
+
};
|
|
11287
11431
|
const orphansAtDestroy = state.orphans ?? [];
|
|
11288
11432
|
if (orphansAtDestroy.length > 0) {
|
|
11289
11433
|
logger.info(`\n${orphansAtDestroy.length} resource(s) are still in AWS from an earlier failed deploy. cdkd left them there because their DeletionPolicy is Retain (CDK's RemovalPolicy.RETAIN), and has been tracking them so a later deploy of this stack could adopt them back instead of colliding with their names.`);
|
|
11290
11434
|
logger.info("Destroying this stack deletes that record. The resources stay in AWS, may continue to incur charges, and cdkd will no longer know about them:");
|
|
11291
|
-
|
|
11435
|
+
const orphanListing = orphanRecordsPrintingBag(orphansAtDestroy, await stackNoEchoValues());
|
|
11436
|
+
for (const entry of orphansAtDestroy) withPrintingSecrets(orphanListing, () => logger.info(` - ${displaySafe(entry.logicalId)} (${displaySafe(entry.state.resourceType)}) ${displaySafe(entry.state.physicalId)}`));
|
|
11292
11437
|
}
|
|
11293
11438
|
if (journaledOrphans.count > 0) {
|
|
11294
11439
|
logger.info(`\n${journaledOrphans.count} resource(s) were created by a failed deploy and are recorded only in the rollback journal. Each is deleted first as its DeletionPolicy directs (Retain keeps it in AWS, Snapshot takes the final snapshot), unless state or a later deploy may own it, which is warned about instead:`);
|
|
11295
|
-
|
|
11440
|
+
const listing = journaledOrphanPrintingBag(journaledOrphans.segments.flatMap(({ ops }) => ops), state.resources, await stackNoEchoValues());
|
|
11441
|
+
withPrintingSecrets(listing, () => {
|
|
11442
|
+
for (const line of journaledOrphanLines(journaledOrphans, logger)) logger.info(line);
|
|
11443
|
+
});
|
|
11296
11444
|
}
|
|
11297
11445
|
if (!ctx.skipConfirmation) {
|
|
11298
11446
|
if (process.stdin.isTTY !== true) throw new CdkdError(`The destroy confirmation prompt for stack ${displayStackName(stackName)} cannot run in a non-interactive environment. Pass --yes / -y to confirm the destroy (cdkd destroy also accepts -f / --force), or run the command from a real terminal.`, "NON_INTERACTIVE_CONFIRM");
|
|
@@ -11439,9 +11587,11 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
11439
11587
|
secretPrincipalRegions = ctx.resolveSecretDerivedPrincipals !== void 0 && (state.parentStack === void 0 || ctx.resolveSecretDerivedPrincipals.inheritedProducerRegions !== void 0) ? destroyProducerRegions(state, ctx.resolveSecretDerivedPrincipals.inheritedProducerRegions) : void 0;
|
|
11440
11588
|
if (ctx.resolveSecretDerivedPrincipals !== void 0 && secretPrincipalRegions === void 0 && Object.values(state.resources ?? {}).some((r) => holdsSecretDerivedPrincipalRecord(r))) logger.warn(safeMsg`${stackName}: this nested child's secret-derived principal records resolve when destroyed through its parent stack; destroyed on its own they are skipped.`);
|
|
11441
11589
|
renderer.start();
|
|
11590
|
+
stackNoEchoValues();
|
|
11442
11591
|
const journaledUnderLock = await loadJournaledOrphans(ctx.stateBackend, stackName, regionForState, state.orphans, journaledOrphans.unreadable === true ? { warn: () => void 0 } : logger);
|
|
11443
11592
|
if (journaledUnderLock.unreadable === true && journaledOrphans.unreadable !== true) throw new Error(`The rollback journal of stack ${displayStackName(stackName)} (${displaySafe(regionForState, { asciiOnly: true })}) was readable when this run started and cannot be read now (see the warning above). Nothing was deleted; re-run the destroy once it can be read.`);
|
|
11444
11593
|
if (!sameJournaledOrphans(journaledUnderLock, journaledOrphans)) throw new Error(`The rollback journal of stack ${displayStackName(stackName)} (${displaySafe(regionForState, { asciiOnly: true })}) recorded ${journaledOrphans.count} resource(s) a failed deploy created when this run started and ${journaledUnderLock.count} now, not the same ones — another cdkd process wrote to it. Nothing was deleted; re-run the destroy to act on the current journal.`);
|
|
11594
|
+
const noEchoValues = await stackNoEchoValues();
|
|
11445
11595
|
if (journaledUnderLock.count > 0) {
|
|
11446
11596
|
const orphanOutcome = await deleteJournaledOrphans(journaledUnderLock, { ...state.resources }, stackName, {
|
|
11447
11597
|
providerRegistry: destroyProviderRegistry,
|
|
@@ -11457,7 +11607,10 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
11457
11607
|
}),
|
|
11458
11608
|
importedProducerRegions: producerRegionsFromState(state),
|
|
11459
11609
|
...state.parentStack !== void 0 && { producerRegionsIncomplete: true }
|
|
11460
|
-
}, {
|
|
11610
|
+
}, {
|
|
11611
|
+
isInterrupted: () => lock.interrupted,
|
|
11612
|
+
noEchoValues
|
|
11613
|
+
});
|
|
11461
11614
|
result.errorCount += orphanOutcome.failures;
|
|
11462
11615
|
journaledOrphanFailures = orphanOutcome.failures;
|
|
11463
11616
|
result.skippedCount += orphanOutcome.skipped;
|
|
@@ -11518,6 +11671,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
11518
11671
|
const graph = dagBuilder.buildGraph(template);
|
|
11519
11672
|
const executionLevels = dagBuilder.getExecutionLevels(graph);
|
|
11520
11673
|
logger.debug(`Dependency graph: ${executionLevels.length} level(s)`);
|
|
11674
|
+
const printingBagOf = secretNamePrintingBags(state.resources, noEchoValues);
|
|
11521
11675
|
for (let levelIndex = executionLevels.length - 1; levelIndex >= 0; levelIndex--) {
|
|
11522
11676
|
if (lock.interrupted) {
|
|
11523
11677
|
logger.debug("Interrupted (draining) — not scheduling further deletion levels");
|
|
@@ -11527,7 +11681,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
11527
11681
|
if (!level) continue;
|
|
11528
11682
|
logger.debug(`Deletion level ${executionLevels.length - levelIndex}/${executionLevels.length} (${level.length} resources)`);
|
|
11529
11683
|
const stackRegion = state.region ?? ctx.baseRegion;
|
|
11530
|
-
const deletePromises = level.map((logicalId) => withPrintingSecrets(
|
|
11684
|
+
const deletePromises = level.map((logicalId) => withPrintingSecrets(printingBagOf(logicalId), async () => {
|
|
11531
11685
|
if (lock.interrupted) return;
|
|
11532
11686
|
const resource = state.resources[logicalId];
|
|
11533
11687
|
if (!resource) {
|
|
@@ -20639,10 +20793,53 @@ function noEchoAttributeNamesCarried(prior, attributes) {
|
|
|
20639
20793
|
const kept = prior.filter((name) => typeof name === "string" && hasOwnKey(attributes, name) && carriesSecretMask(attributes[name]));
|
|
20640
20794
|
return kept.length > 0 ? { noEchoAttributeNames: kept } : {};
|
|
20641
20795
|
}
|
|
20796
|
+
const READS_EVERY_KEY = Symbol("reads every key");
|
|
20797
|
+
function templateGetAttReads(template) {
|
|
20798
|
+
const reads = /* @__PURE__ */ new Map();
|
|
20799
|
+
const addRead = (logicalId, attribute) => {
|
|
20800
|
+
let attributes = reads.get(logicalId);
|
|
20801
|
+
if (!attributes) {
|
|
20802
|
+
attributes = /* @__PURE__ */ new Set();
|
|
20803
|
+
reads.set(logicalId, attributes);
|
|
20804
|
+
}
|
|
20805
|
+
if (typeof attribute === "string") {
|
|
20806
|
+
const segments = attribute.split(".");
|
|
20807
|
+
for (let i = 1; i <= segments.length; i++) attributes.add(segments.slice(0, i).join("."));
|
|
20808
|
+
} else attributes.add(READS_EVERY_KEY);
|
|
20809
|
+
};
|
|
20810
|
+
const walk = (value) => {
|
|
20811
|
+
if (Array.isArray(value)) {
|
|
20812
|
+
for (const item of value) walk(item);
|
|
20813
|
+
return;
|
|
20814
|
+
}
|
|
20815
|
+
if (value === null || typeof value !== "object") return;
|
|
20816
|
+
for (const [key, inner] of Object.entries(value)) {
|
|
20817
|
+
if (key === "Fn::GetAtt") {
|
|
20818
|
+
if (Array.isArray(inner) && typeof inner[0] === "string") addRead(inner[0], inner[1]);
|
|
20819
|
+
else if (typeof inner === "string") {
|
|
20820
|
+
const split = splitGetAttStringForm(inner);
|
|
20821
|
+
if (split) addRead(split.logicalId, split.attributeName);
|
|
20822
|
+
}
|
|
20823
|
+
} else if (key === "Fn::Sub") {
|
|
20824
|
+
const text = Array.isArray(inner) ? inner[0] : inner;
|
|
20825
|
+
if (typeof text === "string") for (const match of text.matchAll(/\$\{([^}]*)\}/g)) {
|
|
20826
|
+
const ref = match[1] ?? "";
|
|
20827
|
+
if (ref.startsWith("!")) continue;
|
|
20828
|
+
const split = splitGetAttStringForm(ref);
|
|
20829
|
+
if (split) addRead(split.logicalId, split.attributeName);
|
|
20830
|
+
}
|
|
20831
|
+
}
|
|
20832
|
+
walk(inner);
|
|
20833
|
+
}
|
|
20834
|
+
};
|
|
20835
|
+
walk(template);
|
|
20836
|
+
return reads;
|
|
20837
|
+
}
|
|
20642
20838
|
function buildStackState(stackName, region, rows, templateParser, template, existingState, selectiveMode) {
|
|
20643
20839
|
const resources = selectiveMode && existingState ? { ...existingState.resources } : {};
|
|
20644
20840
|
const parameterNames = new Set(Object.keys(template.Parameters ?? {}));
|
|
20645
20841
|
let namesParameter;
|
|
20842
|
+
const getAttReads = templateGetAttReads(template);
|
|
20646
20843
|
for (const row of rows) {
|
|
20647
20844
|
if (row.outcome !== "imported" || !row.physicalId) continue;
|
|
20648
20845
|
const tmplResource = template.Resources[row.logicalId];
|
|
@@ -20654,10 +20851,14 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
|
|
|
20654
20851
|
const { stillMaskedKeys, keptRecordedKeys } = reimported;
|
|
20655
20852
|
const attributes = withDeclaredNoEchoMasked(reimported.attributes, prior && prior.physicalId === row.physicalId ? prior.noEchoAttributeNames : void 0);
|
|
20656
20853
|
if (keptRecordedKeys.length > 0) getLogger().info(safeMsg`${displayIdent(row.logicalId)}: this import recorded ` + safeMsg`${keptRecordedKeys.map((key) => displayIdent(key)).join(", ")} only as the ` + "redaction mask, so the previously recorded value is kept; a deploy that updates the resource rewrites it.");
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20854
|
+
const readAttributes = getAttReads.get(row.logicalId);
|
|
20855
|
+
const refusedKeys = stillMaskedKeys.filter((key) => readAttributes?.has(key) === true || readAttributes?.has(READS_EVERY_KEY) === true);
|
|
20856
|
+
const unreadKeys = stillMaskedKeys.filter((key) => !refusedKeys.includes(key));
|
|
20857
|
+
if (unreadKeys.length > 0) getLogger().debug(safeMsg`${displayIdent(row.logicalId)}: the redaction mask stays recorded under ` + safeMsg`${unreadKeys.map((key) => displayIdent(key)).join(", ")}; this template reads none of them.`);
|
|
20858
|
+
if (refusedKeys.length > 0) {
|
|
20859
|
+
const keys = refusedKeys.map((key) => displayIdent(key)).join(", ");
|
|
20860
|
+
const pronoun = refusedKeys.length === 1 ? "it" : "them";
|
|
20861
|
+
getLogger().warn(safeMsg`${displayIdent(row.logicalId)}: this import produced no value to replace the redaction ` + safeMsg`mask recorded under ${keys}, so the mask is kept and an Fn::GetAtt reading ${pronoun} ` + "in this template is still refused at deploy. It is kept rather than cleared because an attribute missing from state resolves to the physical id instead of failing.");
|
|
20661
20862
|
}
|
|
20662
20863
|
resources[row.logicalId] = {
|
|
20663
20864
|
physicalId: row.physicalId,
|
|
@@ -28594,4 +28795,4 @@ function collectVerbFlags(program) {
|
|
|
28594
28795
|
|
|
28595
28796
|
//#endregion
|
|
28596
28797
|
export { canonicalizeIpProtocolValue as a, buildProgram, resolveSecretDerivedPrincipals as i, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, canonicalizeIpv4Cidr as t };
|
|
28597
|
-
//# sourceMappingURL=program-
|
|
28798
|
+
//# sourceMappingURL=program-D5gcmWad.js.map
|