@go-to-k/cdkd 0.290.28 → 0.290.30
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-DiZsq-4k.js → asg-provider-De5KONKr.js} +3 -3
- package/dist/{asg-provider-DiZsq-4k.js.map → asg-provider-De5KONKr.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-CcFbq2q8.js → deploy-engine-mI1Xv1oi.js} +237 -80
- package/dist/{deploy-engine-CcFbq2q8.js.map → deploy-engine-mI1Xv1oi.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{logger-6LP1UiFA.js → logger-BjWM-UVj.js} +42 -2
- package/dist/logger-BjWM-UVj.js.map +1 -0
- package/dist/{program-C1iVGcxJ.js → program-qSSjqstP.js} +219 -40
- package/dist/{program-C1iVGcxJ.js.map → program-qSSjqstP.js.map} +1 -1
- package/dist/{version-B2-UuEte.js → version-C15BftsD.js} +2 -2
- package/dist/{version-B2-UuEte.js.map → version-C15BftsD.js.map} +1 -1
- package/package.json +1 -1
- package/dist/logger-6LP1UiFA.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as secretBearing, $n as recordMaskOnlyValue, $r as AssetManifestLoader, $t as s3BucketArn, A as extractDeploymentEventError, Ai as getAwsClients, An as refuseMalformedState, Ar as BOOTSTRAP_MARKER_PREFIX, At as isImpossibleEmptyStoredAttribute, B as toCfnInteger, Bi as IntrinsicResolutionRefusalError, Bn as STATE_SOURCED_BASELINE_RULES, Br as buildDockerImage, Bt as coerceCfnBoolean, C as buildFinalSnapshotIdentifier, Ci as canonicalizeRegion, Cn as producerRecordKey, Cr as stringifyValue, Ct as isTerminationProtectionPropagationError, D as refusesFinalSnapshot, Dn as refuseMalformedOutputsForDestroy, Dr as loadPublishableAssetManifest, Dt as cfnRefValueFromPhysicalId, E as isFinalSnapshotError, Ei as processStackMessages, En as refuseMalformedOutputs, Er as createAssetRedirectResolver, Et as carriesFetchableDynamicReference, F as isStatefulRecreateTargetSync, Fn as findSilentDropProperties, Fr as parseBootstrapMarker, Ft as isSettledInstanceState, G as gray, Gi as NestedStackChildDirectDestroyError, Gn as createSecretMasker, Gr as formatDockerLoginError, Gt as readConfigString, H as formatResourceLine, Hi as LocalStartServiceError, Hn as STATE_SOURCED_READBACK_RULES, Hr as describeDockerExecFailure, Ht as configBooleanRefusal, I as renderStatefulReason, Ii as CrossAccountSecretRefusalError, In as describeTypeWithThrottleRetry, Ir as readBootstrapMarkerBody, It as WAFv2WebACLProvider, J as yellow, Ji as ResourceTimeoutError, Jn as identityKeyFor, Jr as redactDockerArgvValues, Jt as requireConfigObject, K as green, Ki as PartialFailureError, Kn as dynamicReferenceTokens, Kr as getDockerCmd, Kt as replayWarn, L as WARM_THROUGHPUT_MEMBERS, Ln as withRetry, Lr as validateAssetBucketName, Lt as normalizeAwsTagsToCfn, M as planOrphanAdoption, Mi as setAwsClients, Mn as repairMalformedResourcePropertiesForReadOnly, Mr as ensureAssetStorage, Mt as isUnboundTemplateParameter, N as MULTI_REGION_RECREATE_BLOCKED_TYPES, Nn as repairMalformedResourcesForReadOnly, Nr as getBootstrapMarkerKey, Nt as parameterTypeMayLoseSecretIdentity, O as unsupportedFinalSnapshotError, Oi as resolveBucketRegion, On as refuseMalformedResourcePropertiesForOrphan, Or as rewriteTemplateAssetReferences, Ot as coerceParameterTypedValue, P as isStatefulRecreateTargetForReplace, Pi as CdkdError, Pn as findActionableSilentDrops, Pr as isCrossRegionRedirect, Pt as refStateLookupFromResource, Q as isExportAliasCollision, Qn as maskSecretsInText, Qr as stripControlChars, Qt as withSharedDrainBudget, R as coerceWarmThroughput$1, Ri as DeployCancelledError, Rn as DagBuilder, Rr as validateContainerRepoName, Rt as resolveExplicitPhysicalId, S as PRE_DELETE_SNAPSHOT_TYPES, Si as PARTITION_TABLE, Sn as malformedStateRefusalMessage, Sr as AssetPublisher, St as disableInstanceApiTermination, T as createPreDeleteFinalSnapshot, Ti as AssemblyReader, Tn as refuseMalformedNestedChildOutputs, Tr as buildAssetRedirectMap, Tt as carriesDynamicReference, U as bold, Un as TEMPLATE_SOURCED_RULES, Ur as describeDockerFailure, Ut as configIntegerRefusal, V as toFiniteNumber, Vi as LocalInvokeBuildError$1, Vn as STATE_SOURCED_CROSS_GENERATION_RULES, Vr as describeDockerCapturedOutput, Vt as coerceCfnInteger, W as cyan, Wi as MalformedProducerRecordRefusalError, Wn as carriesSecretMask, Wr as dockerSpawnEnvWithSensitive, Wt as configStringRefusal, X as collectPublishedOutputNames, Xi as StackHasActiveImportsError, Xn as markSameGenerationBag, Xr as runDockerStreaming, Xt as classifyReplaySecretRegion, Y as collectDeclaredOutputNames, Yi as ResourceUpdateNotSupportedError, Yn as isSingleDynamicReferenceToken, Yr as runDockerForeground, Yt as requireConfigString, Z as exportAliasCollisionScrubWarning, Zi as StackTerminationProtectionError, Zn as maskSecretsInError, Zr as escapeRegExp, Zt as producerRegionsFromState, _ as isSecretBearingReferenceString, _i as findLargeInlineResources, _n as malformedOutputsRefusalMessage, _r as importableOutputs, _t as isWaitAbandonedError, a as DeploymentEventsStore, aa as isRetryableTransientError, ai as resolveApp, an as AWS_CREDENTIAL_ENV_KEYS, ar as rebuildClientForBucketRegion, at as clearOnUpdateRemoval, b as bindingSkippedOutputs, bi as decodeListingKey, bn as malformedResourcePropertiesWarning, br as orphansCarriedFrom, bt as deleteIndeterminateGuards, c as replayFailedOperations, ca as markNonRetryable, ci as resolveSkipPrefix, cn as envCredentialsAreAssumedRole, cr as buildLockContentionMessage, ct as createMaskedRetryLogger, d as updatePartialReason, da as describeAwsFailure, di as resolveUseCdkBootstrapAssets, dn as STATE_RESOURCES_MALFORMED, dr as shellQuote, dt as beginCommandInterruptScope, ei as getDockerImageBySourceHash, en as s3BucketDomainName, er as recoverMaskedOutput, et as secretBearingStateKeyWarning, f as withResourceDeadline, fa as safeStringify, fi as stateBucketExistenceConfirmed, fn as hasReadableOutputs, fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, ft as endCommandInterruptScope, g as bagHoldsSecretExpression, gi as MIGRATE_TMP_PREFIX, gn as malformedLocalOutputsWarning, gr as importableOutputKeys, gt as CloudControlProvider, h as computeImplicitDeleteEdges, hi as CFN_TEMPLATE_URL_LIMIT, hn as malformedExportSourceWarning, hr as hasReadableExportSet, ht as startInterruptWatch, i as DeploymentEventsReader, ia as isMarkedNonRetryable, ii as getLegacyStateBucketName, in as applyRoleArnIfSet, ir as S3StateBackend, it as collectInlinePolicyNamesManagedBySiblings, j as makeSiblingClaimReader, ji as resetAwsClients, jn as repairMalformedOutputsForReadOnly, jr as assertAssetBucketRegion, jt as isNamelessDynamicReferenceError, k as makeCanonicalizePropertiesFn, ki as AwsClients, kn as refuseMalformedResourcesForDestroy, kr as AssetModeResolver, kt as getAccountInfo, l as replayRollback, la as markRedactedCause, li as resolveStateBucketWithDefault, ln as DiffCalculator, lr as forceQuitRecoveryClause, lt as maskDeep, m as IMPLICIT_DELETE_DEPENDENCIES, mi as CFN_TEMPLATE_BODY_LIMIT, mn as malformedExportNamesWarning, mr as exportNamesCarriedFrom, mt as isInterruptedWaitError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as normalizeAwsError, ni as synthesisStatusMessage, nn as s3BucketRegionalDomainName, nr as scrubResourceRecord, nt as getCurrentResourceSecrets, o as planFailedOps, oa as isThrottlingError, oi as resolveAutoAssetStorage, on as applyCallerIdentityCredentials, or as UNREPRODUCIBLE_LOCK_CLAUSE, ot as ProviderRegistry, p as maskingRetryLogger, pi as warnDeprecatedNoPrefixCliFlag, pn as hasReadableResources, pr as DEFAULT_STATE_PREFIX, pt as interruptWatchListenerCount, q as red, qi as ProvisioningError, qn as errorCauseChain, qr as partitionSensitiveEnv, qt as requireConfigArray, r as DeployEngine, ra as withErrorHandling, ri as getDefaultStateBucketName, rn as s3BucketWebsiteUrl, rr as LockManager, rt as IAMRoleProvider, s as planRollback, sa as isTransientServerError, si as resolveCaptureObservedState, sn as callerEnvCredentials, sr as buildForceUnlockCommand, st as wouldReturnToSdkProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as Synthesizer, tn as s3BucketDualStackDomainName, tr as redactSecretsForState, tt as secretSafeKeyDisplay, u as updatePartialMessage, ua as retryClassificationText, ui as resolveStateBucketWithDefaultAndSource, un as INTRINSIC_KEYS, ur as formatLockExpiry, ut as maskerOrIdentity, v as keptWholeReasonText, vi as uploadCfnTemplate, vn as malformedOutputsWarning, vr as isReadableBag, vt as slowCcOperationTimeoutMs, w as ccRoutedFinalSnapshotError, wi as derivePartitionAndUrlSuffix, wn as refuseDivergentRecordRegionForDestroy, wr as WorkGraph, wt as IntrinsicFunctionResolver, x as ATOMIC_FINAL_SNAPSHOT_TYPES, xi as expectedOwnerParam, xn as malformedResourcesWarning, xr as shouldRetainResource, xt as deleteSkipReason, y as mergeNoChangeOutputs, yi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, yn as malformedRenderedContainersWarning, yr as orphansAfterRollback, yt as UNSPECIFIED_SKIP_REASON, z as isWarmThroughputDecrease, zi as DynamicReferenceRegionAmbiguousError, zn as TemplateParser, zr as buildDenyExternalAccessPolicy, zt as assertRegionMatch } from "./deploy-engine-
|
|
2
|
-
import { C as
|
|
1
|
+
import { $ as secretBearing, $n as recordMaskOnlyValue, $r as AssetManifestLoader, $t as s3BucketArn, A as extractDeploymentEventError, Ai as getAwsClients, An as refuseMalformedState, Ar as BOOTSTRAP_MARKER_PREFIX, At as isImpossibleEmptyStoredAttribute, B as toCfnInteger, Bi as IntrinsicResolutionRefusalError, Bn as STATE_SOURCED_BASELINE_RULES, Br as buildDockerImage, Bt as coerceCfnBoolean, C as buildFinalSnapshotIdentifier, Ci as canonicalizeRegion, Cn as producerRecordKey, Cr as stringifyValue, Ct as isTerminationProtectionPropagationError, D as refusesFinalSnapshot, Dn as refuseMalformedOutputsForDestroy, Dr as loadPublishableAssetManifest, Dt as cfnRefValueFromPhysicalId, E as isFinalSnapshotError, Ei as processStackMessages, En as refuseMalformedOutputs, Er as createAssetRedirectResolver, Et as carriesFetchableDynamicReference, F as isStatefulRecreateTargetSync, Fn as findSilentDropProperties, Fr as parseBootstrapMarker, Ft as isSettledInstanceState, G as gray, Gi as NestedStackChildDirectDestroyError, Gn as createSecretMasker, Gr as formatDockerLoginError, Gt as readConfigString, H as formatResourceLine, Hi as LocalStartServiceError, Hn as STATE_SOURCED_READBACK_RULES, Hr as describeDockerExecFailure, Ht as configBooleanRefusal, I as renderStatefulReason, Ii as CrossAccountSecretRefusalError, In as describeTypeWithThrottleRetry, Ir as readBootstrapMarkerBody, It as WAFv2WebACLProvider, J as yellow, Ji as ResourceTimeoutError, Jn as identityKeyFor, Jr as redactDockerArgvValues, Jt as requireConfigObject, K as green, Ki as PartialFailureError, Kn as dynamicReferenceTokens, Kr as getDockerCmd, Kt as replayWarn, L as WARM_THROUGHPUT_MEMBERS, Ln as withRetry, Lr as validateAssetBucketName, Lt as normalizeAwsTagsToCfn, M as planOrphanAdoption, Mi as setAwsClients, Mn as repairMalformedResourcePropertiesForReadOnly, Mr as ensureAssetStorage, Mt as isUnboundTemplateParameter, N as MULTI_REGION_RECREATE_BLOCKED_TYPES, Nn as repairMalformedResourcesForReadOnly, Nr as getBootstrapMarkerKey, Nt as parameterTypeMayLoseSecretIdentity, O as unsupportedFinalSnapshotError, Oi as resolveBucketRegion, On as refuseMalformedResourcePropertiesForOrphan, Or as rewriteTemplateAssetReferences, Ot as coerceParameterTypedValue, P as isStatefulRecreateTargetForReplace, Pi as CdkdError, Pn as findActionableSilentDrops, Pr as isCrossRegionRedirect, Pt as refStateLookupFromResource, Q as isExportAliasCollision, Qn as maskSecretsInText, Qr as stripControlChars, Qt as withSharedDrainBudget, R as coerceWarmThroughput$1, Ri as DeployCancelledError, Rn as DagBuilder, Rr as validateContainerRepoName, Rt as resolveExplicitPhysicalId, S as PRE_DELETE_SNAPSHOT_TYPES, Si as PARTITION_TABLE, Sn as malformedStateRefusalMessage, Sr as AssetPublisher, St as disableInstanceApiTermination, T as createPreDeleteFinalSnapshot, Ti as AssemblyReader, Tn as refuseMalformedNestedChildOutputs, Tr as buildAssetRedirectMap, Tt as carriesDynamicReference, U as bold, Un as TEMPLATE_SOURCED_RULES, Ur as describeDockerFailure, Ut as configIntegerRefusal, V as toFiniteNumber, Vi as LocalInvokeBuildError$1, Vn as STATE_SOURCED_CROSS_GENERATION_RULES, Vr as describeDockerCapturedOutput, Vt as coerceCfnInteger, W as cyan, Wi as MalformedProducerRecordRefusalError, Wn as carriesSecretMask, Wr as dockerSpawnEnvWithSensitive, Wt as configStringRefusal, X as collectPublishedOutputNames, Xi as StackHasActiveImportsError, Xn as markSameGenerationBag, Xr as runDockerStreaming, Xt as classifyReplaySecretRegion, Y as collectDeclaredOutputNames, Yi as ResourceUpdateNotSupportedError, Yn as isSingleDynamicReferenceToken, Yr as runDockerForeground, Yt as requireConfigString, Z as exportAliasCollisionScrubWarning, Zi as StackTerminationProtectionError, Zn as maskSecretsInError, Zr as escapeRegExp, Zt as producerRegionsFromState, _ as isSecretBearingReferenceString, _i as findLargeInlineResources, _n as malformedOutputsRefusalMessage, _r as importableOutputs, _t as isWaitAbandonedError, a as DeploymentEventsStore, aa as isRetryableTransientError, ai as resolveApp, an as AWS_CREDENTIAL_ENV_KEYS, ar as rebuildClientForBucketRegion, at as clearOnUpdateRemoval, b as bindingSkippedOutputs, bi as decodeListingKey, bn as malformedResourcePropertiesWarning, br as orphansCarriedFrom, bt as deleteIndeterminateGuards, c as replayFailedOperations, ca as markNonRetryable, ci as resolveSkipPrefix, cn as envCredentialsAreAssumedRole, cr as buildLockContentionMessage, ct as createMaskedRetryLogger, d as updatePartialReason, da as describeAwsFailure, di as resolveUseCdkBootstrapAssets, dn as STATE_RESOURCES_MALFORMED, dr as shellQuote, dt as beginCommandInterruptScope, ei as getDockerImageBySourceHash, en as s3BucketDomainName, er as recoverMaskedOutput, et as secretBearingStateKeyWarning, f as withResourceDeadline, fa as safeStringify, fi as stateBucketExistenceConfirmed, fn as hasReadableOutputs, fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, ft as endCommandInterruptScope, g as bagHoldsSecretExpression, gi as MIGRATE_TMP_PREFIX, gn as malformedLocalOutputsWarning, gr as importableOutputKeys, gt as CloudControlProvider, h as computeImplicitDeleteEdges, hi as CFN_TEMPLATE_URL_LIMIT, hn as malformedExportSourceWarning, hr as hasReadableExportSet, ht as startInterruptWatch, i as DeploymentEventsReader, ia as isMarkedNonRetryable, ii as getLegacyStateBucketName, in as applyRoleArnIfSet, ir as S3StateBackend, it as collectInlinePolicyNamesManagedBySiblings, j as makeSiblingClaimReader, ji as resetAwsClients, jn as repairMalformedOutputsForReadOnly, jr as assertAssetBucketRegion, jt as isNamelessDynamicReferenceError, k as makeCanonicalizePropertiesFn, ki as AwsClients, kn as refuseMalformedResourcesForDestroy, kr as AssetModeResolver, kt as getAccountInfo, l as replayRollback, la as markRedactedCause, li as resolveStateBucketWithDefault, ln as DiffCalculator, lr as forceQuitRecoveryClause, lt as maskDeep, m as IMPLICIT_DELETE_DEPENDENCIES, mi as CFN_TEMPLATE_BODY_LIMIT, mn as malformedExportNamesWarning, mr as exportNamesCarriedFrom, mt as isInterruptedWaitError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as normalizeAwsError, ni as synthesisStatusMessage, nn as s3BucketRegionalDomainName, nr as scrubResourceRecord, nt as getCurrentResourceSecrets, o as planFailedOps, oa as isThrottlingError, oi as resolveAutoAssetStorage, on as applyCallerIdentityCredentials, or as UNREPRODUCIBLE_LOCK_CLAUSE, ot as ProviderRegistry, p as maskingRetryLogger, pi as warnDeprecatedNoPrefixCliFlag, pn as hasReadableResources, pr as DEFAULT_STATE_PREFIX, pt as interruptWatchListenerCount, q as red, qi as ProvisioningError, qn as errorCauseChain, qr as partitionSensitiveEnv, qt as requireConfigArray, r as DeployEngine, ra as withErrorHandling, ri as getDefaultStateBucketName, rn as s3BucketWebsiteUrl, rr as LockManager, rt as IAMRoleProvider, s as planRollback, sa as isTransientServerError, si as resolveCaptureObservedState, sn as callerEnvCredentials, sr as buildForceUnlockCommand, st as wouldReturnToSdkProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as Synthesizer, tn as s3BucketDualStackDomainName, tr as redactSecretsForState, tt as secretSafeKeyDisplay, u as updatePartialMessage, ua as retryClassificationText, ui as resolveStateBucketWithDefaultAndSource, un as INTRINSIC_KEYS, ur as formatLockExpiry, ut as maskerOrIdentity, v as keptWholeReasonText, vi as uploadCfnTemplate, vn as malformedOutputsWarning, vr as isReadableBag, vt as slowCcOperationTimeoutMs, w as ccRoutedFinalSnapshotError, wi as derivePartitionAndUrlSuffix, wn as refuseDivergentRecordRegionForDestroy, wr as WorkGraph, wt as IntrinsicFunctionResolver, x as ATOMIC_FINAL_SNAPSHOT_TYPES, xi as expectedOwnerParam, xn as malformedResourcesWarning, xr as shouldRetainResource, xt as deleteSkipReason, y as mergeNoChangeOutputs, yi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, yn as malformedRenderedContainersWarning, yr as orphansAfterRollback, yt as UNSPECIFIED_SKIP_REASON, z as isWarmThroughputDecrease, zi as DynamicReferenceRegionAmbiguousError, zn as TemplateParser, zr as buildDenyExternalAccessPolicy, zt as assertRegionMatch } from "./deploy-engine-mI1Xv1oi.js";
|
|
2
|
+
import { C as displayAwsMessage, E as truncateCodePoints, S as UNRENDERABLE, T as displaySafe, _ as withSkipPrefix, b as SECRET_REF_MAX_CODE_POINTS, c as PATTERN_B_NAME_OPTIONS, f as explicitNamePropertyFor, h as getCurrentStackName, i as reserveStdoutForPayload, l as PATTERN_B_NAME_PROPERTIES, m as generateResourceNameWithFallback, n as getLogger, o as runStackBuffered, p as generateResourceName, s as getLiveRenderer, u as PATTERN_B_RESOURCE_TYPES, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS } from "./logger-BjWM-UVj.js";
|
|
3
3
|
import { n as awsClientDefaults } from "./aws-client-defaults-BoIxyCir.js";
|
|
4
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
-
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as getCdkdVersion } from "./version-C15BftsD.js";
|
|
5
|
+
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-De5KONKr.js";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -1089,6 +1089,21 @@ const deployOptions = [
|
|
|
1089
1089
|
* -c / --context can be specified multiple times to pass context key=value pairs
|
|
1090
1090
|
*/
|
|
1091
1091
|
const contextOptions = [new Option("-c, --context <key=value...>", "Set context values (can be specified multiple times)")];
|
|
1092
|
+
/**
|
|
1093
|
+
* ANCHORED AT THE START ONLY, and that is what makes the renders below a
|
|
1094
|
+
* display boundary rather than a formality (issue
|
|
1095
|
+
* [#3397](https://github.com/go-to-k/cdkd/issues/3397)).
|
|
1096
|
+
*
|
|
1097
|
+
* A value CLEARING this test is constrained in its first ~30 characters and in
|
|
1098
|
+
* nothing after `role/` — `arn:aws:iam::1:role/` followed by an ESC, a
|
|
1099
|
+
* newline, or 10 MB of anything is a PASS. So `normalizeStartApiAssumeRole`'s
|
|
1100
|
+
* mutual-exclusion error, which renders an ARN this regex already accepted,
|
|
1101
|
+
* needs sanitizing exactly as much as the three REFUSALS that render one it
|
|
1102
|
+
* rejected. Tightening the regex instead was considered and is the wrong tool:
|
|
1103
|
+
* `src/utils/role-arn.ts`'s `IAM_ROLE_ARN_RE` is the strict parse, it runs
|
|
1104
|
+
* later and on a different path, and a stricter argparse here would start
|
|
1105
|
+
* refusing role-name shapes the deploy path accepts.
|
|
1106
|
+
*/
|
|
1092
1107
|
const IAM_ROLE_ARN_REGEX = /^arn:[^:]+:iam::\d+:role\//;
|
|
1093
1108
|
/**
|
|
1094
1109
|
* Argparse for the repeatable `--assume-role` flag.
|
|
@@ -1102,16 +1117,17 @@ const IAM_ROLE_ARN_REGEX = /^arn:[^:]+:iam::\d+:role\//;
|
|
|
1102
1117
|
function parseAssumeRoleToken(raw, previous) {
|
|
1103
1118
|
const acc = previous ?? { perLambda: {} };
|
|
1104
1119
|
if (!acc.perLambda) acc.perLambda = {};
|
|
1120
|
+
const shownRaw = displayIdent(raw, { maxCodePoints: 613 });
|
|
1105
1121
|
const eqIndex = raw.indexOf("=");
|
|
1106
1122
|
if (eqIndex === -1) {
|
|
1107
|
-
if (!IAM_ROLE_ARN_REGEX.test(raw)) throw new Error(`Invalid --assume-role value "${
|
|
1123
|
+
if (!IAM_ROLE_ARN_REGEX.test(raw)) throw new Error(`Invalid --assume-role value "${shownRaw}": expected an IAM role ARN like arn:aws:iam::123456789012:role/MyRole, or LogicalId=<arn>.`);
|
|
1108
1124
|
acc.globalArn = raw;
|
|
1109
1125
|
return acc;
|
|
1110
1126
|
}
|
|
1111
1127
|
const logicalId = raw.substring(0, eqIndex).trim();
|
|
1112
1128
|
const arn = raw.substring(eqIndex + 1).trim();
|
|
1113
|
-
if (!/^[A-Za-z][A-Za-z0-9]*$/.test(logicalId)) throw new Error(`Invalid --assume-role value "${
|
|
1114
|
-
if (!IAM_ROLE_ARN_REGEX.test(arn)) throw new Error(`Invalid --assume-role value "${
|
|
1129
|
+
if (!/^[A-Za-z][A-Za-z0-9]*$/.test(logicalId)) throw new Error(`Invalid --assume-role value "${shownRaw}": left-hand side "${displayIdent(logicalId)}" must be a CloudFormation logical ID (alphanumeric, leading letter).`);
|
|
1130
|
+
if (!IAM_ROLE_ARN_REGEX.test(arn)) throw new Error(`Invalid --assume-role value "${shownRaw}": right-hand side "${displayIdent(arn, { maxCodePoints: 613 })}" must be an IAM role ARN like arn:aws:iam::123456789012:role/MyRole.`);
|
|
1115
1131
|
acc.perLambda[logicalId] = arn;
|
|
1116
1132
|
return acc;
|
|
1117
1133
|
}
|
|
@@ -1140,7 +1156,7 @@ function normalizeStartApiAssumeRole(raw, autoResolve) {
|
|
|
1140
1156
|
perLambda: {},
|
|
1141
1157
|
bareAutoResolve: true
|
|
1142
1158
|
} : void 0;
|
|
1143
|
-
if (autoResolve && raw.globalArn) throw new Error(`--assume-role-auto auto-resolves EACH routed Lambda's own execution role, but --assume-role ${raw.globalArn} also names a single global default. These are mutually exclusive on the global slot. Either drop the global ARN to keep --assume-role-auto for every Lambda, or drop --assume-role-auto to keep the global default. Per-Lambda overrides (--assume-role <LogicalId>=<arn>) are compatible with either side.`);
|
|
1159
|
+
if (autoResolve && raw.globalArn) throw new Error(`--assume-role-auto auto-resolves EACH routed Lambda's own execution role, but --assume-role ${displayIdent(raw.globalArn, { maxCodePoints: 613 })} also names a single global default. These are mutually exclusive on the global slot. Either drop the global ARN to keep --assume-role-auto for every Lambda, or drop --assume-role-auto to keep the global default. Per-Lambda overrides (--assume-role <LogicalId>=<arn>) are compatible with either side.`);
|
|
1144
1160
|
if (autoResolve) raw.bareAutoResolve = true;
|
|
1145
1161
|
return raw;
|
|
1146
1162
|
}
|
|
@@ -12149,6 +12165,16 @@ function isSqsQueueUrl(value) {
|
|
|
12149
12165
|
//#endregion
|
|
12150
12166
|
//#region src/provisioning/providers/sns-topic-provider.ts
|
|
12151
12167
|
/**
|
|
12168
|
+
* The value SNS enforces for a topic that never set `MaximumMessageSize`
|
|
12169
|
+
* (256 KiB, the standard maximum), and therefore what a template REMOVAL of
|
|
12170
|
+
* the member resets the attribute to — SNS refuses the `''` the other
|
|
12171
|
+
* `SetTopicAttributes` removals send (`MaximumMessageSize: is not an integer
|
|
12172
|
+
* between 1024 and 1048576 bytes`, measured us-east-1 2026-09-18). A fresh
|
|
12173
|
+
* topic REPORTS no value at all, which `readCurrentState` folds to this value;
|
|
12174
|
+
* see there. Exported for the unit tests that pin both halves (issue #3413).
|
|
12175
|
+
*/
|
|
12176
|
+
const SNS_MAXIMUM_MESSAGE_SIZE_DEFAULT = "262144";
|
|
12177
|
+
/**
|
|
12152
12178
|
* AWS SNS Topic Provider
|
|
12153
12179
|
*
|
|
12154
12180
|
* Implements resource provisioning for AWS::SNS::Topic using the SNS SDK.
|
|
@@ -12172,7 +12198,8 @@ var SNSTopicProvider = class {
|
|
|
12172
12198
|
"DataProtectionPolicy",
|
|
12173
12199
|
"DeliveryStatusLogging",
|
|
12174
12200
|
"Subscription",
|
|
12175
|
-
"FifoThroughputScope"
|
|
12201
|
+
"FifoThroughputScope",
|
|
12202
|
+
"MaximumMessageSize"
|
|
12176
12203
|
])]]);
|
|
12177
12204
|
constructor() {
|
|
12178
12205
|
const awsClients = getAwsClients();
|
|
@@ -12207,6 +12234,7 @@ var SNSTopicProvider = class {
|
|
|
12207
12234
|
if (properties["TracingConfig"]) topicAttributes["TracingConfig"] = properties["TracingConfig"];
|
|
12208
12235
|
if (properties["SignatureVersion"]) topicAttributes["SignatureVersion"] = stringifyValue(properties["SignatureVersion"]);
|
|
12209
12236
|
if (properties["FifoThroughputScope"]) topicAttributes["FifoThroughputScope"] = properties["FifoThroughputScope"];
|
|
12237
|
+
if (properties["MaximumMessageSize"] != null) topicAttributes["MaximumMessageSize"] = stringifyValue(properties["MaximumMessageSize"]);
|
|
12210
12238
|
let tags;
|
|
12211
12239
|
if (properties["Tags"]) tags = properties["Tags"];
|
|
12212
12240
|
const createParams = {
|
|
@@ -12293,7 +12321,7 @@ var SNSTopicProvider = class {
|
|
|
12293
12321
|
}
|
|
12294
12322
|
async applyUpdate(logicalId, physicalId, properties, previousProperties, maskSecrets) {
|
|
12295
12323
|
this.logger.debug(`Updating SNS topic ${logicalId}: ${physicalId}`);
|
|
12296
|
-
|
|
12324
|
+
const mutableAttributes = [
|
|
12297
12325
|
{
|
|
12298
12326
|
name: "DisplayName",
|
|
12299
12327
|
prop: "DisplayName"
|
|
@@ -12327,13 +12355,19 @@ var SNSTopicProvider = class {
|
|
|
12327
12355
|
name: "DataProtectionPolicy",
|
|
12328
12356
|
prop: "DataProtectionPolicy",
|
|
12329
12357
|
serialize: true
|
|
12358
|
+
},
|
|
12359
|
+
{
|
|
12360
|
+
name: "MaximumMessageSize",
|
|
12361
|
+
prop: "MaximumMessageSize",
|
|
12362
|
+
resetValue: SNS_MAXIMUM_MESSAGE_SIZE_DEFAULT
|
|
12330
12363
|
}
|
|
12331
|
-
]
|
|
12364
|
+
];
|
|
12365
|
+
for (const attr of mutableAttributes) {
|
|
12332
12366
|
const newVal = properties[attr.prop];
|
|
12333
12367
|
const oldVal = previousProperties[attr.prop];
|
|
12334
12368
|
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
|
|
12335
12369
|
let value;
|
|
12336
|
-
if (newVal === void 0 || newVal === null) value = "";
|
|
12370
|
+
if (newVal === void 0 || newVal === null) value = attr.resetValue ?? "";
|
|
12337
12371
|
else if (attr.serialize && typeof newVal !== "string") value = JSON.stringify(newVal);
|
|
12338
12372
|
else value = stringifyValue(newVal);
|
|
12339
12373
|
await this.snsClient.send(new SetTopicAttributesCommand({
|
|
@@ -12568,6 +12602,9 @@ var SNSTopicProvider = class {
|
|
|
12568
12602
|
"SignatureVersion"
|
|
12569
12603
|
]) result[key] = attrs[key] ?? "";
|
|
12570
12604
|
if (attrs["FifoTopic"] === "true") result["FifoThroughputScope"] = attrs["FifoThroughputScope"] ?? "";
|
|
12605
|
+
const liveMaxSize = attrs["MaximumMessageSize"] || "262144";
|
|
12606
|
+
const maxSizeNumber = Number(liveMaxSize);
|
|
12607
|
+
result["MaximumMessageSize"] = Number.isFinite(maxSizeNumber) ? maxSizeNumber : liveMaxSize;
|
|
12571
12608
|
for (const key of ["ArchivePolicy", "DataProtectionPolicy"]) {
|
|
12572
12609
|
const v = attrs[key];
|
|
12573
12610
|
if (v) try {
|
|
@@ -49644,10 +49681,14 @@ var AppSyncProvider = class {
|
|
|
49644
49681
|
}
|
|
49645
49682
|
const explicit = resolveExplicitPhysicalId(input, null);
|
|
49646
49683
|
if (explicit) try {
|
|
49647
|
-
await this.getClient().send(new GetGraphqlApiCommand({ apiId: explicit }));
|
|
49684
|
+
const response = await this.getClient().send(new GetGraphqlApiCommand({ apiId: explicit }));
|
|
49648
49685
|
return {
|
|
49649
49686
|
physicalId: explicit,
|
|
49650
|
-
attributes: {
|
|
49687
|
+
attributes: definedAttributes({
|
|
49688
|
+
ApiId: explicit,
|
|
49689
|
+
Arn: response.graphqlApi?.arn,
|
|
49690
|
+
GraphQLUrl: response.graphqlApi?.uris?.["GRAPHQL"]
|
|
49691
|
+
})
|
|
49651
49692
|
};
|
|
49652
49693
|
} catch (err) {
|
|
49653
49694
|
if (err instanceof NotFoundException$4) return null;
|
|
@@ -72193,7 +72234,7 @@ function createIamPrincipalUniqueIdResolver(awsClients) {
|
|
|
72193
72234
|
entityId = user?.UserId;
|
|
72194
72235
|
}
|
|
72195
72236
|
if (entityArn !== void 0 && entityArn.toLowerCase() === arn.toLowerCase()) uniqueId = entityId;
|
|
72196
|
-
else getLogger().debug(`Principal ${arn} resolved to ${entityArn
|
|
72237
|
+
else getLogger().debug(`Principal ${displayIdent(arn, { maxCodePoints: 613 })} resolved to ${entityArn === void 0 ? "no entity" : displayIdent(entityArn, { maxCodePoints: 613 })} — same name in this account or under another IAM path; leaving the policy principal comparison untouched.`);
|
|
72197
72238
|
} catch (error) {
|
|
72198
72239
|
const message = error instanceof Error ? error.message : String(error);
|
|
72199
72240
|
const name = error instanceof Error ? error.name : "";
|
|
@@ -72203,7 +72244,7 @@ function createIamPrincipalUniqueIdResolver(awsClients) {
|
|
|
72203
72244
|
warnedOnDenied = true;
|
|
72204
72245
|
getLogger().warn(`Cannot read IAM principals (${name || "access denied"}). A resource policy whose principal AWS rendered as a unique id (AROA…/AIDA…) may therefore report drift that is only a spelling difference; grant iam:GetRole / iam:GetUser to resolve it, or re-run with --verbose for the full error.`);
|
|
72205
72246
|
}
|
|
72206
|
-
getLogger().debug(`Could not resolve the unique id of principal ${arn} (${message}); leaving the policy principal comparison untouched.`);
|
|
72247
|
+
getLogger().debug(`Could not resolve the unique id of principal ${displayIdent(arn, { maxCodePoints: 613 })} (${displayAwsMessage(message)}); leaving the policy principal comparison untouched.`);
|
|
72207
72248
|
if (isThrottlingError(error)) return void 0;
|
|
72208
72249
|
}
|
|
72209
72250
|
cache.set(arn, uniqueId);
|
|
@@ -75867,6 +75908,43 @@ const COMPOSITE_ID_SPLITTERS = {
|
|
|
75867
75908
|
},
|
|
75868
75909
|
propertiesOverlay: { FunctionName: functionName }
|
|
75869
75910
|
};
|
|
75911
|
+
},
|
|
75912
|
+
"AWS::AppSync::ApiKey": (physicalId, properties) => {
|
|
75913
|
+
const trimmed = physicalId.trim();
|
|
75914
|
+
if (!trimmed) throw new Error("empty physical id for AWS::AppSync::ApiKey (expected 'apiId|apiKeyId', the key ARN, or a bare apiKeyId)");
|
|
75915
|
+
const arnMatch = /^arn:[^:]+:appsync:[^:]*:[^:]*:apis\/([^/|]+)\/apikey\/([^/|]+)$/.exec(trimmed);
|
|
75916
|
+
if (arnMatch) {
|
|
75917
|
+
const [, apiId, apiKeyId] = arnMatch;
|
|
75918
|
+
return {
|
|
75919
|
+
resourceIdentifier: {
|
|
75920
|
+
ApiId: apiId,
|
|
75921
|
+
ApiKeyId: apiKeyId
|
|
75922
|
+
},
|
|
75923
|
+
propertiesOverlay: { ApiId: apiId }
|
|
75924
|
+
};
|
|
75925
|
+
}
|
|
75926
|
+
if (trimmed.startsWith("arn:")) throw new Error(`'${physicalId}' looks like an ARN but is not an AppSync API key ARN (expected arn:<partition>:appsync:<region>:<account>:apis/<apiId>/apikey/<apiKeyId>)`);
|
|
75927
|
+
const parts = trimmed.split("|");
|
|
75928
|
+
if (parts.length > 2) throw new Error(`expected 'apiId|apiKeyId', the key ARN, or a bare apiKeyId, got ${parts.length} parts: '${physicalId}'`);
|
|
75929
|
+
if (parts.length === 2) {
|
|
75930
|
+
const [apiId, apiKeyId] = parts;
|
|
75931
|
+
if (!apiId.trim() || !apiKeyId.trim()) throw new Error(`empty part in 'apiId|apiKeyId': '${physicalId}'`);
|
|
75932
|
+
return {
|
|
75933
|
+
resourceIdentifier: {
|
|
75934
|
+
ApiId: apiId,
|
|
75935
|
+
ApiKeyId: apiKeyId
|
|
75936
|
+
},
|
|
75937
|
+
propertiesOverlay: { ApiId: apiId }
|
|
75938
|
+
};
|
|
75939
|
+
}
|
|
75940
|
+
const apiId = readStringProperty(properties, "ApiId", "AWS::AppSync::ApiKey");
|
|
75941
|
+
return {
|
|
75942
|
+
resourceIdentifier: {
|
|
75943
|
+
ApiId: apiId,
|
|
75944
|
+
ApiKeyId: trimmed
|
|
75945
|
+
},
|
|
75946
|
+
propertiesOverlay: { ApiId: apiId }
|
|
75947
|
+
};
|
|
75870
75948
|
}
|
|
75871
75949
|
};
|
|
75872
75950
|
/**
|
|
@@ -76184,6 +76262,24 @@ function createIdentifierBackfillDeps(ec2Client) {
|
|
|
76184
76262
|
* | `AWS::AppSync::Resolver` | `ResolverArn` | `attributes.ResolverArn` |
|
|
76185
76263
|
* | `AWS::S3Tables::Table` | `TableARN` | `attributes.TableARN` |
|
|
76186
76264
|
* | `AWS::EC2::SecurityGroupIngress` | `Id` | `attributes.Id` (issue #1761) |
|
|
76265
|
+
* | `AWS::AppSync::GraphQLApi` | `Arn` (2026-09-18) | `attributes.Arn` (issue #3414) |
|
|
76266
|
+
*
|
|
76267
|
+
* The GraphQLApi row is the one whose identifier AWS RE-DECLARED under cdkd:
|
|
76268
|
+
* the 2026-09-17 public bundle flipped it from `ApiId` to `Arn` (issue #3327
|
|
76269
|
+
* recorded the two published sources disagreeing at the time), and by
|
|
76270
|
+
* 2026-09-18 `describe-type` in us-east-1 answers `["/properties/Arn"]` with a
|
|
76271
|
+
* full handler set. cdkd's physicalId is the bare `apiId`, which is NOT the ARN
|
|
76272
|
+
* and cannot be turned into one without account + partition, so the entry
|
|
76273
|
+
* reads the `Arn` attribute `AppSyncProvider.create` records. Because the
|
|
76274
|
+
* flip is recent and the two sources disagreed, the entry ALSO declares
|
|
76275
|
+
* `physicalIdIsIdentifierFor: ['ApiId']`: a schema that reports the OLD
|
|
76276
|
+
* single field is not a schema change that needs a code edit — for a record
|
|
76277
|
+
* cdkd deployed, the physicalId already IS that value — so `resolveCompositeId`
|
|
76278
|
+
* takes the plain single-key path for it instead of refusing by name. The
|
|
76279
|
+
* bypass excludes an ARN-shaped physicalId (a `--migrate-from-cloudformation`
|
|
76280
|
+
* record stores CloudFormation's `PhysicalResourceId`, the ARN), which under
|
|
76281
|
+
* a pre-flip registry keeps the loud cross-check refusal rather than shipping
|
|
76282
|
+
* an ARN as `ApiId`.
|
|
76187
76283
|
*
|
|
76188
76284
|
* The SG-ingress row is measured the same way as the rest, and separately
|
|
76189
76285
|
* against a real CloudFormation stack because the three strings that name one
|
|
@@ -76197,11 +76293,21 @@ function createIdentifierBackfillDeps(ec2Client) {
|
|
|
76197
76293
|
* `sgr-02345615af6d2db0d`, with `Ref` and `Fn::GetAtt .Id` both returning that
|
|
76198
76294
|
* same value.
|
|
76199
76295
|
*
|
|
76200
|
-
* All
|
|
76201
|
-
* IMPORT — unlike `AWS::Glue::Table`, the type issue #1659's title names,
|
|
76202
|
-
* CFn rejects outright (see {@link typeIsImportUnsupported}).
|
|
76296
|
+
* All five declare a `read` handler. For four of them CFn genuinely does accept
|
|
76297
|
+
* the IMPORT — unlike `AWS::Glue::Table`, the type issue #1659's title names,
|
|
76298
|
+
* which CFn rejects outright (see {@link typeIsImportUnsupported}). The fifth,
|
|
76299
|
+
* `AWS::AppSync::GraphQLApi`, is measured REFUSED despite its read handler
|
|
76300
|
+
* (see {@link CFN_IMPORT_REFUSED_DESPITE_REGISTRY}), so its row below is
|
|
76301
|
+
* reachable only under `--skip-import-support-preflight`.
|
|
76203
76302
|
*/
|
|
76204
76303
|
const COMPOSITE_PHYSICAL_ID_IDENTIFIERS = {
|
|
76304
|
+
"AWS::AppSync::GraphQLApi": recordedArnIdentifier({
|
|
76305
|
+
resourceType: "AWS::AppSync::GraphQLApi",
|
|
76306
|
+
field: "Arn",
|
|
76307
|
+
physicalIdShape: "<apiId>",
|
|
76308
|
+
arnServiceSegment: "appsync",
|
|
76309
|
+
physicalIdIsIdentifierFor: ["ApiId"]
|
|
76310
|
+
}),
|
|
76205
76311
|
"AWS::AppSync::DataSource": recordedArnIdentifier({
|
|
76206
76312
|
resourceType: "AWS::AppSync::DataSource",
|
|
76207
76313
|
field: "DataSourceArn",
|
|
@@ -76617,7 +76723,7 @@ function maskedIdentifierAttributeReason(field, logicalId) {
|
|
|
76617
76723
|
* and the remedy is the one that doc already gives.
|
|
76618
76724
|
*/
|
|
76619
76725
|
function recordedArnIdentifier(options) {
|
|
76620
|
-
const { resourceType, field, physicalIdShape, arnServiceSegment } = options;
|
|
76726
|
+
const { resourceType, field, physicalIdShape, arnServiceSegment, physicalIdIsIdentifierFor } = options;
|
|
76621
76727
|
/**
|
|
76622
76728
|
* Is this value usable AS the type's CFn identifier?
|
|
76623
76729
|
*
|
|
@@ -76634,12 +76740,14 @@ function recordedArnIdentifier(options) {
|
|
|
76634
76740
|
};
|
|
76635
76741
|
return {
|
|
76636
76742
|
field,
|
|
76743
|
+
...physicalIdIsIdentifierFor && { physicalIdIsIdentifierFor },
|
|
76637
76744
|
resolve: ({ logicalId, physicalId, attributes }) => {
|
|
76638
76745
|
const recorded = attributes[field];
|
|
76639
76746
|
if (typeof recorded === "string" && isUsableIdentifier(recorded)) return recorded.trim();
|
|
76640
76747
|
if (isUsableIdentifier(physicalId)) return physicalId.trim();
|
|
76641
76748
|
const recordedNote = typeof recorded === "string" && recorded.trim() ? `attributes.${field} is recorded as '${recorded.trim()}', which is not a ${arnServiceSegment} ARN` : `attributes.${field} is missing or empty`;
|
|
76642
|
-
|
|
76749
|
+
const shapeWord = physicalIdShape.includes("|") ? "the composite" : "the bare";
|
|
76750
|
+
throw new Error(`cdkd's physical id for ${resourceType} is ${shapeWord} '${physicalIdShape}', but CloudFormation IMPORT identifies the resource by its ${field}, which cdkd state does not record usably for '${logicalId}' (${recordedNote}). Re-deploy the stack once so cdkd records ${field}, then re-run cdkd export.`);
|
|
76643
76751
|
}
|
|
76644
76752
|
};
|
|
76645
76753
|
}
|
|
@@ -77517,6 +77625,15 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
|
|
|
77517
77625
|
}
|
|
77518
77626
|
let resolved;
|
|
77519
77627
|
try {
|
|
77628
|
+
const measuredRefusal = cfnRefusesImportDespiteRegistry(resourceType);
|
|
77629
|
+
if (!options.skipImportSupportPreflight && measuredRefusal !== void 0) {
|
|
77630
|
+
blocked.push({
|
|
77631
|
+
logicalId,
|
|
77632
|
+
resourceType,
|
|
77633
|
+
reason: `AWS CloudFormation does not support ${resourceType} in IMPORT changesets, ${measuredRefusal}. Its registry schema passes cdkd's read-handler pre-flight, so without this list CreateChangeSet would reject the whole export with "ResourceTypes [${resourceType}] are not supported for Import" after the stack was locked. Remove the resource from the stack before exporting (it stays in AWS and can be re-declared in CloudFormation afterwards), or destroy it first and let CloudFormation create it fresh. If AWS has since added IMPORT support for this type, re-run with --skip-import-support-preflight and please open a cdkd issue.`
|
|
77634
|
+
});
|
|
77635
|
+
continue;
|
|
77636
|
+
}
|
|
77520
77637
|
const schemaInfo = await cachedTypeSchemaInfo(resourceType, cfnClient, identifierCache);
|
|
77521
77638
|
if (!options.skipImportSupportPreflight && typeIsImportUnsupported(schemaInfo)) {
|
|
77522
77639
|
blocked.push({
|
|
@@ -77622,7 +77739,8 @@ function groupBlockedReasons(blocked) {
|
|
|
77622
77739
|
* IMPORT pre-flight and this resolution.
|
|
77623
77740
|
*/
|
|
77624
77741
|
async function resolveResourceIdentifier(resourceType, logicalId, physicalId, properties, attributes, entry, backfillDeps) {
|
|
77625
|
-
const
|
|
77742
|
+
const registered = Object.hasOwn(COMPOSITE_PHYSICAL_ID_IDENTIFIERS, resourceType) ? COMPOSITE_PHYSICAL_ID_IDENTIFIERS[resourceType] : void 0;
|
|
77743
|
+
const compositeIdentifier = registered && entry.fields.length === 1 && registered.physicalIdIsIdentifierFor?.includes(entry.fields[0]) && !physicalId.trim().startsWith("arn:") ? void 0 : registered;
|
|
77626
77744
|
if (compositeIdentifier) {
|
|
77627
77745
|
if (entry.fields.length !== 1 || entry.fields[0] !== compositeIdentifier.field) throw new Error(`${resourceType} is registered in COMPOSITE_PHYSICAL_ID_IDENTIFIERS as identified by '${compositeIdentifier.field}', but CloudFormation now reports primaryIdentifier [${entry.fields.join(", ")}]. The registry schema changed under cdkd — update the entry in src/cli/commands/export.ts (or move the type to COMPOSITE_ID_SPLITTERS if its identifier is now composite too)`);
|
|
77628
77746
|
const value = await resolveIdentifierValue(compositeIdentifier, {
|
|
@@ -77676,6 +77794,14 @@ async function cachedTypeSchemaInfo(resourceType, cfnClient, cache) {
|
|
|
77676
77794
|
* legacy types) and a `handlers` block whose keys are only create / update /
|
|
77677
77795
|
* delete (`AWS::EC2::NetworkAclEntry`).
|
|
77678
77796
|
*
|
|
77797
|
+
* That list is a MEASUREMENT, not a contract, and AWS moves types off it:
|
|
77798
|
+
* `AWS::AppSync::ApiKey` was re-published `FULLY_MUTABLE` with a full handler
|
|
77799
|
+
* set by 2026-09-18 (issue #3414), so it now passes this pre-flight and is
|
|
77800
|
+
* resolved by its `COMPOSITE_ID_SPLITTERS` entry instead. The refusal reads
|
|
77801
|
+
* the LIVE response, so such a move needs no edit here — only the resolution
|
|
77802
|
+
* that the refusal used to shadow. `AWS::AppSync::GraphQLSchema` is still on
|
|
77803
|
+
* the list as of that date (no `handlers` block, `NON_PROVISIONABLE`).
|
|
77804
|
+
*
|
|
77679
77805
|
* **Why the verdict needs TWO agreeing fields.** Reading "the `handlers` key is
|
|
77680
77806
|
* missing" as a refusal on its own makes any partial or unusual response block
|
|
77681
77807
|
* an export that works today — the one regression this pre-flight could cause,
|
|
@@ -77695,6 +77821,35 @@ function typeIsImportUnsupported(entry) {
|
|
|
77695
77821
|
return entry.importSupport === "unsupported";
|
|
77696
77822
|
}
|
|
77697
77823
|
/**
|
|
77824
|
+
* Types CloudFormation REFUSES in an IMPORT changeset although their registry
|
|
77825
|
+
* schema passes {@link typeIsImportUnsupported} — a `read` handler declared,
|
|
77826
|
+
* `ProvisioningType: FULLY_MUTABLE` — so the registry heuristic lets them
|
|
77827
|
+
* through and `CreateChangeSet` answers `ResourceTypes [<T>] are not
|
|
77828
|
+
* supported for Import` after the lock, the prompt and the template
|
|
77829
|
+
* preprocessing have already happened. The heuristic is NECESSARY (a type
|
|
77830
|
+
* with no read handler is never importable) but the 2026-09-18 measurement
|
|
77831
|
+
* showed it is not SUFFICIENT: AWS's supported-for-import list is a separate
|
|
77832
|
+
* fact the registry does not carry.
|
|
77833
|
+
*
|
|
77834
|
+
* Each entry is a dated measurement, and the map is the `blocked` message's
|
|
77835
|
+
* evidence. `--skip-import-support-preflight` bypasses this set together with
|
|
77836
|
+
* the heuristic, for the same reason it exists there: AWS may add support
|
|
77837
|
+
* without cdkd noticing, and the changeset is then the authority.
|
|
77838
|
+
*
|
|
77839
|
+
* | Type | measured |
|
|
77840
|
+
* |---|---|
|
|
77841
|
+
* | `AWS::AppSync::GraphQLApi` | us-east-1, 2026-09-18, the `export` integ fixture: registry `[read, create, update, delete, list]` / `FULLY_MUTABLE` / identifier `Arn`; `CreateChangeSet --change-set-type IMPORT` carrying the API (resolved to its ARN) rejected with `ResourceTypes [AWS::AppSync::GraphQLApi] are not supported for Import`. `AWS::AppSync::ApiKey` is NOT here: a standalone IMPORT changeset carrying one key with `{ApiId, ApiKeyId}` reached `CREATE_COMPLETE` the same day. (issue #3414) |
|
|
77842
|
+
*/
|
|
77843
|
+
const CFN_IMPORT_REFUSED_DESPITE_REGISTRY = /* @__PURE__ */ new Map([["AWS::AppSync::GraphQLApi", "measured in us-east-1 on 2026-09-18: the registry schema declares a read handler and FULLY_MUTABLE, yet CreateChangeSet --change-set-type IMPORT rejected the type"]]);
|
|
77844
|
+
/**
|
|
77845
|
+
* The dated measurement behind a {@link CFN_IMPORT_REFUSED_DESPITE_REGISTRY}
|
|
77846
|
+
* entry, or `undefined` when CloudFormation has not been measured refusing the
|
|
77847
|
+
* type. Exported for unit tests.
|
|
77848
|
+
*/
|
|
77849
|
+
function cfnRefusesImportDespiteRegistry(resourceType) {
|
|
77850
|
+
return CFN_IMPORT_REFUSED_DESPITE_REGISTRY.get(resourceType);
|
|
77851
|
+
}
|
|
77852
|
+
/**
|
|
77698
77853
|
* Fetch the primary identifier field names for a resource type, with a
|
|
77699
77854
|
* hardcoded single-key fallback when DescribeType is unavailable.
|
|
77700
77855
|
*/
|
|
@@ -79227,7 +79382,7 @@ async function confirmPrompt$3(prompt) {
|
|
|
79227
79382
|
return confirmOrRefuse(prompt, { refusal: "The cdkd export confirmation prompt cannot run in a non-interactive environment. Pass -y / --yes to confirm, or run the command from a real terminal." });
|
|
79228
79383
|
}
|
|
79229
79384
|
function createExportCommand() {
|
|
79230
|
-
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 let CreateChangeSet answer instead.
|
|
79385
|
+
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::ApiGatewayV2::Stage and 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));
|
|
79231
79386
|
[
|
|
79232
79387
|
...commonOptions,
|
|
79233
79388
|
...appOptions,
|
|
@@ -81337,6 +81492,30 @@ function safeStack(value) {
|
|
|
81337
81492
|
return displayIdent(value, { maxCodePoints: STACK_REF_MAX_CODE_POINTS });
|
|
81338
81493
|
}
|
|
81339
81494
|
/**
|
|
81495
|
+
* `safe()` for an IAM ROLE ARN, the SECOND value class in this file whose
|
|
81496
|
+
* legitimate grammar runs past `displayIdent`'s 255-code-point default (issue
|
|
81497
|
+
* go-to-k/cdkd#3397 review).
|
|
81498
|
+
*
|
|
81499
|
+
* An AWS-legal role ARN reaches 613 code points — a 512-character path plus a
|
|
81500
|
+
* 64-character name — so `safe()` cut the one ARN this file renders at 255 and
|
|
81501
|
+
* appended `[cut: N more characters withheld]` INSIDE
|
|
81502
|
+
* `pass --role-arn to match`, the sentence whose only job is to say which role
|
|
81503
|
+
* to pass back. That is verbatim the failure `ROLE_ARN_MAX_CODE_POINTS`'s own
|
|
81504
|
+
* doc exists to prevent, and the display fence could not see it: it checks that
|
|
81505
|
+
* a sanitizer was CALLED, never which cap the call passed.
|
|
81506
|
+
*
|
|
81507
|
+
* A NAMED helper rather than a `maxCodePoints` argument at the site, for the
|
|
81508
|
+
* reason {@link safeStack} records about itself — a per-site spelling of
|
|
81509
|
+
* exactly this rule is what issue #3164 exists to stop, and a first cut of this
|
|
81510
|
+
* fix wrote one before the reference-count fence in
|
|
81511
|
+
* `tests/unit/cli/commands/rollback.test.ts` refused it. That refusal is the
|
|
81512
|
+
* fence working: it forces the question "which helper does this value belong
|
|
81513
|
+
* in" to be answered in code rather than in a diff.
|
|
81514
|
+
*/
|
|
81515
|
+
function safeRoleArn(value) {
|
|
81516
|
+
return displayIdent(value, { maxCodePoints: 613 });
|
|
81517
|
+
}
|
|
81518
|
+
/**
|
|
81340
81519
|
* Human label for a planned rollback action (plan preview). `skipFinalSnapshot`
|
|
81341
81520
|
* is threaded in because the classifier is pure (it cannot see CLI flags) and
|
|
81342
81521
|
* the Snapshot label would otherwise promise a final snapshot the run is about
|
|
@@ -81456,7 +81635,7 @@ async function rollbackCommand(stackArg, options) {
|
|
|
81456
81635
|
const mintedOrphans = [];
|
|
81457
81636
|
const orphanLogicalIds = new Set(options.orphan ?? []);
|
|
81458
81637
|
const newestSegment = journal.segments[journal.segments.length - 1];
|
|
81459
|
-
if (newestSegment.roleArn && !options.roleArn) logger.info(`Note: the failed deploy ran with --role-arn ${
|
|
81638
|
+
if (newestSegment.roleArn && !options.roleArn) logger.info(`Note: the failed deploy ran with --role-arn ${safeRoleArn(newestSegment.roleArn)}; this rollback is running with ambient credentials (pass --role-arn to match).`);
|
|
81460
81639
|
logger.info(`\nRollback plan for '${safeStack(stackName)}' (${safe(region)}):`);
|
|
81461
81640
|
const planStateView = { ...stateResources };
|
|
81462
81641
|
for (let s = journal.segments.length - 1; s >= 0; s--) {
|
|
@@ -88434,11 +88613,11 @@ async function pullEcrImage(imageUri, options) {
|
|
|
88434
88613
|
const cached = ASSUMED_ROLE_CACHE.get(cacheKey);
|
|
88435
88614
|
if (cached && isCredentialFresh(cached)) {
|
|
88436
88615
|
assumed = cached;
|
|
88437
|
-
logger.debug(`Reusing cached AssumeRole credentials for ${displayIdent(options.ecrRoleArn, { maxCodePoints:
|
|
88616
|
+
logger.debug(`Reusing cached AssumeRole credentials for ${displayIdent(options.ecrRoleArn, { maxCodePoints: 613 })}`);
|
|
88438
88617
|
} else {
|
|
88439
88618
|
assumed = await assumeRoleForEcr(options.ecrRoleArn, callerRegion, logger);
|
|
88440
88619
|
ASSUMED_ROLE_CACHE.set(cacheKey, assumed);
|
|
88441
|
-
logger.info(`Assumed role ${displayIdent(options.ecrRoleArn, { maxCodePoints:
|
|
88620
|
+
logger.info(`Assumed role ${displayIdent(options.ecrRoleArn, { maxCodePoints: 613 })} for ECR pull (account=${parsed.accountId}, region=${parsed.region})`);
|
|
88442
88621
|
}
|
|
88443
88622
|
} else if (crossAccount) logger.info(`Cross-account ECR pull: image account ${parsed.accountId} != caller ${callerAccount}. Using the caller's credentials; pass --ecr-role-arn <arn> if AWS rejects with AccessDenied.`);
|
|
88444
88623
|
if (crossRegion) logger.info(`Cross-region ECR pull: image region ${parsed.region} != caller ${callerRegion ?? "(unset)"}. Authenticating against the image region directly.`);
|
|
@@ -88469,7 +88648,7 @@ async function pullEcrImage(imageUri, options) {
|
|
|
88469
88648
|
* mirrors the convention used by `src/utils/role-arn.ts`.
|
|
88470
88649
|
*/
|
|
88471
88650
|
async function assumeRoleForEcr(roleArn, callerRegion, logger) {
|
|
88472
|
-
logger.debug(`Assuming role ${displayIdent(roleArn, { maxCodePoints:
|
|
88651
|
+
logger.debug(`Assuming role ${displayIdent(roleArn, { maxCodePoints: 613 })} for ECR pull...`);
|
|
88473
88652
|
const sts = new STSClient({
|
|
88474
88653
|
...awsClientDefaults(),
|
|
88475
88654
|
...callerRegion && { region: callerRegion }
|
|
@@ -88480,7 +88659,7 @@ async function assumeRoleForEcr(roleArn, callerRegion, logger) {
|
|
|
88480
88659
|
RoleSessionName: `cdkd-local-ecr-${Date.now()}`,
|
|
88481
88660
|
DurationSeconds: 3600
|
|
88482
88661
|
}))).Credentials;
|
|
88483
|
-
if (!creds || !creds.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new LocalInvokeBuildError$1(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
88662
|
+
if (!creds || !creds.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new LocalInvokeBuildError$1(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials. Verify the role's trust policy allows your identity to assume it.`);
|
|
88484
88663
|
return {
|
|
88485
88664
|
accessKeyId: creds.AccessKeyId,
|
|
88486
88665
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -88490,7 +88669,7 @@ async function assumeRoleForEcr(roleArn, callerRegion, logger) {
|
|
|
88490
88669
|
} catch (err) {
|
|
88491
88670
|
if (err instanceof LocalInvokeBuildError$1) throw err;
|
|
88492
88671
|
const reason = err instanceof Error ? err.message : String(err);
|
|
88493
|
-
throw new LocalInvokeBuildError$1(`Failed to assume role ${displayIdent(roleArn, { maxCodePoints:
|
|
88672
|
+
throw new LocalInvokeBuildError$1(`Failed to assume role ${displayIdent(roleArn, { maxCodePoints: 613 })} for ECR pull: ${displaySafe(reason)}. Verify the role exists and its trust policy permits the caller's identity to assume it.`);
|
|
88494
88673
|
} finally {
|
|
88495
88674
|
sts.destroy();
|
|
88496
88675
|
}
|
|
@@ -90869,7 +91048,7 @@ async function assumeLambdaExecutionRole$1(roleArn, region) {
|
|
|
90869
91048
|
RoleSessionName: `cdkd-local-start-api-${Date.now()}`,
|
|
90870
91049
|
DurationSeconds: 3600
|
|
90871
91050
|
}))).Credentials;
|
|
90872
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
91051
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`);
|
|
90873
91052
|
return {
|
|
90874
91053
|
accessKeyId: creds.AccessKeyId,
|
|
90875
91054
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -92232,7 +92411,7 @@ async function resolvePlaceholderAccount(arn, region) {
|
|
|
92232
92411
|
});
|
|
92233
92412
|
try {
|
|
92234
92413
|
const account = (await sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
92235
|
-
if (!account) throw new Error(`--assume-task-role: GetCallerIdentity returned no Account; cannot resolve placeholder ARN ${displayIdent(arn, { maxCodePoints:
|
|
92414
|
+
if (!account) throw new Error(`--assume-task-role: GetCallerIdentity returned no Account; cannot resolve placeholder ARN ${displayIdent(arn, { maxCodePoints: 613 })}. Pass the ARN explicitly: --assume-task-role <arn>`);
|
|
92236
92415
|
return arn.split(TASK_ROLE_ACCOUNT_PLACEHOLDER).join(account);
|
|
92237
92416
|
} finally {
|
|
92238
92417
|
sts.destroy();
|
|
@@ -92254,7 +92433,7 @@ async function assumeTaskRole(roleArn, region) {
|
|
|
92254
92433
|
RoleSessionName: `cdkd-local-run-task-${Date.now()}`,
|
|
92255
92434
|
DurationSeconds: 3600
|
|
92256
92435
|
}))).Credentials;
|
|
92257
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
92436
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`);
|
|
92258
92437
|
return {
|
|
92259
92438
|
accessKeyId: creds.AccessKeyId,
|
|
92260
92439
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -93736,7 +93915,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
|
|
|
93736
93915
|
if (stsRegion) dockerEnv["AWS_REGION"] = stsRegion;
|
|
93737
93916
|
assumeSucceeded = true;
|
|
93738
93917
|
} catch (err) {
|
|
93739
|
-
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints:
|
|
93918
|
+
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed: ${displaySafe(err instanceof Error ? err.message : String(err))}. Falling back to the developer's shell credentials.`);
|
|
93740
93919
|
}
|
|
93741
93920
|
}
|
|
93742
93921
|
if (!assumeSucceeded) {
|
|
@@ -93793,7 +93972,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
|
|
|
93793
93972
|
*/
|
|
93794
93973
|
function assumeRoleFallbackWarning(args) {
|
|
93795
93974
|
const fallback = args.profile ? `--profile ${displayIdent(args.profile)}` : args.fallbackWithoutProfile;
|
|
93796
|
-
return `--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints:
|
|
93975
|
+
return `--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed for ${args.purpose}: ${displaySafe(args.error instanceof Error ? args.error.message : String(args.error))}. Falling back to ${fallback}.`;
|
|
93797
93976
|
}
|
|
93798
93977
|
/**
|
|
93799
93978
|
* Resolve the role ARN to assume, honoring the three `--assume-role` forms.
|
|
@@ -93954,7 +94133,7 @@ async function assumeAgentCoreExecutionRole(roleArn, region) {
|
|
|
93954
94133
|
RoleSessionName: `${getEmbedConfig().resourceNamePrefix}-invoke-agentcore-${Date.now()}`,
|
|
93955
94134
|
DurationSeconds: 3600
|
|
93956
94135
|
}))).Credentials;
|
|
93957
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new CdkdError(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
94136
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new CdkdError(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`, "LOCAL_INVOKE_AGENTCORE_ASSUMEROLE_NO_CREDS");
|
|
93958
94137
|
return {
|
|
93959
94138
|
accessKeyId: creds.AccessKeyId,
|
|
93960
94139
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -94567,7 +94746,7 @@ async function localInvokeCommand(target, options) {
|
|
|
94567
94746
|
const arn = resolveExecutionRoleArnFromState(stateForRoleHint, lambda.logicalId);
|
|
94568
94747
|
if (arn) {
|
|
94569
94748
|
resolvedAssumeRoleArn = arn;
|
|
94570
|
-
logger.info(`--assume-role: auto-resolved execution role from cdkd state: ${displayIdent(arn, { maxCodePoints:
|
|
94749
|
+
logger.info(`--assume-role: auto-resolved execution role from cdkd state: ${displayIdent(arn, { maxCodePoints: 613 })}`);
|
|
94571
94750
|
} else logger.warn(`--assume-role: could not resolve the execution role ARN from cdkd state for '${lambda.logicalId}'. Pass the ARN explicitly: --assume-role <arn>. Falling back to the developer's shell credentials.`);
|
|
94572
94751
|
}
|
|
94573
94752
|
} else maybeSuggestAssumeRole(options, stateForRoleHint, lambda.logicalId);
|
|
@@ -95035,7 +95214,7 @@ async function applyLambdaCredentialEnv(dockerEnv, args) {
|
|
|
95035
95214
|
assumeSucceeded = true;
|
|
95036
95215
|
} catch (err) {
|
|
95037
95216
|
const reason = err instanceof Error ? err.message : String(err);
|
|
95038
|
-
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints:
|
|
95217
|
+
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed: ${displaySafe(reason)}. Falling back to the developer's shell credentials.`);
|
|
95039
95218
|
}
|
|
95040
95219
|
}
|
|
95041
95220
|
if (!assumeSucceeded) {
|
|
@@ -95073,7 +95252,7 @@ async function assumeLambdaExecutionRole(roleArn, region) {
|
|
|
95073
95252
|
RoleSessionName: `cdkd-local-invoke-${Date.now()}`,
|
|
95074
95253
|
DurationSeconds: 3600
|
|
95075
95254
|
}))).Credentials;
|
|
95076
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
95255
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`);
|
|
95077
95256
|
return {
|
|
95078
95257
|
accessKeyId: creds.AccessKeyId,
|
|
95079
95258
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -95194,7 +95373,7 @@ function materializeInlineCode(handler, source, fileExtension) {
|
|
|
95194
95373
|
function suggestAssumeRoleFromState(state, logicalId) {
|
|
95195
95374
|
const logger = getLogger();
|
|
95196
95375
|
const roleArn = resolveExecutionRoleArnFromState(state, logicalId);
|
|
95197
|
-
if (roleArn) logger.info(`Hint: the deployed function uses execution role ${displayIdent(roleArn, { maxCodePoints:
|
|
95376
|
+
if (roleArn) logger.info(`Hint: the deployed function uses execution role ${displayIdent(roleArn, { maxCodePoints: 613 })}. Re-run with --assume-role to invoke under the deployed function's narrow permissions.`);
|
|
95198
95377
|
}
|
|
95199
95378
|
/**
|
|
95200
95379
|
* Emit the "re-run with `--assume-role`" hint, if it applies.
|
|
@@ -95354,4 +95533,4 @@ function buildProgram() {
|
|
|
95354
95533
|
|
|
95355
95534
|
//#endregion
|
|
95356
95535
|
export { buildProgram };
|
|
95357
|
-
//# sourceMappingURL=program-
|
|
95536
|
+
//# sourceMappingURL=program-qSSjqstP.js.map
|