@go-to-k/cdkd 0.278.49 → 0.278.50
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-t9dJL0zs.js → asg-provider-C217C6UE.js} +2 -2
- package/dist/{asg-provider-t9dJL0zs.js.map → asg-provider-C217C6UE.js.map} +1 -1
- package/dist/cli.js +77 -40
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BgLg1tet.js → deploy-engine-D2mbS9va.js} +27 -9
- package/dist/deploy-engine-D2mbS9va.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BgLg1tet.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as DiffCalculator, $t as resolveBucketRegion, A as red, At as getDockerImageBySourceHash, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefaultAndSource, C as isStatefulRecreateTargetSync, Ct as validateContainerRepoName, D as cyan, Dt as runDockerForeground, E as bold, En as withErrorHandling, Et as getDockerCmd, F as ProviderRegistry, Ft as resolveApp, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_URL_LIMIT, H as cfnRefValueFromPhysicalId, Ht as stateBucketExistenceConfirmed, I as findActionableSilentDrops, It as resolveAutoAssetStorage, J as readConfigString, Jt as uploadCfnTemplate, K as resolveExplicitPhysicalId, Kt as MIGRATE_TMP_PREFIX, L as CloudControlProvider, Lt as resolveCaptureObservedState, M as IAMRoleProvider, Mt as synthesisStatusMessage, N as collectInlinePolicyNamesManagedBySiblings, Nt as getDefaultStateBucketName, O as gray, Ot as runDockerStreaming, P as clearOnUpdateRemoval, Pt as getLegacyStateBucketName, Q as applyRoleArnIfSet, R as slowCcOperationTimeoutMs, Rt as resolveSkipPrefix, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateAssetBucketName, T as formatResourceLine, Tn as normalizeAwsError, Tt as formatDockerLoginError, U as refStateLookupFromResource, Ut as warnDeprecatedNoPrefixCliFlag, V as IntrinsicFunctionResolver, Vt as resolveUseCdkBootstrapAssets, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_BODY_LIMIT, X as requireConfigArray, Xt as AssemblyReader, Y as replayWarn, Yt as expectedOwnerParam, Z as requireConfigString, Zt as processStackMessages, _ as createPreDeleteFinalSnapshot, _n as ResourceTimeoutError, _t as AssetModeResolver, a as DeploymentEventsStore, an as CdkdError, at as TemplateParser, b as unsupportedFinalSnapshotError, bn as StackTerminationProtectionError, bt as getBootstrapMarkerKey, c as replayFailedOperations, cn as DeployCancelledError, ct as rebuildClientForBucketRegion, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalStartServiceError, dt as stringifyValue, en as AwsClients, et as describeTypeWithThrottleRetry, f as computeImplicitDeleteEdges, ft as WorkGraph, g as ccRoutedFinalSnapshotError, gn as ProvisioningError, gt as rewriteTemplateAssetReferences, h as buildFinalSnapshotIdentifier, hn as PartialFailureError, ht as loadPublishableAssetManifest, i as DeploymentEventsReader, it as DagBuilder, j as yellow, jt as Synthesizer, k as green, kt as AssetManifestLoader, l as replayRollback, ln as LocalInvokeBuildError$1, lt as shouldRetainResource, m as PRE_DELETE_SNAPSHOT_TYPES, mn as NestedStackChildDirectDestroyError, mt as createAssetRedirectResolver, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resetAwsClients, nt as isRetryableTransientError, o as planFailedOps, ot as LockManager, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as MissingCdkCliError, pt as buildAssetRedirectMap, q as assertRegionMatch, qt as findLargeInlineResources, r as DeployEngine, rn as setAwsClients, rt as isThrottlingError, s as planRollback, st as S3StateBackend, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as getAwsClients, tt as withRetry, u as withResourceDeadline, un as LocalMigrateError, ut as AssetPublisher, v as isFinalSnapshotError, vn as ResourceUpdateNotSupportedError, vt as BOOTSTRAP_MARKER_PREFIX, w as renderStatefulReason, wt as buildDockerImage, x as extractDeploymentEventError, xt as parseBootstrapMarker, y as refusesFinalSnapshot, yn as StackHasActiveImportsError, yt as ensureAssetStorage, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefault } from "./deploy-engine-
|
|
2
|
+
import { $ as DiffCalculator, $t as resolveBucketRegion, A as red, At as getDockerImageBySourceHash, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefaultAndSource, C as isStatefulRecreateTargetSync, Ct as validateContainerRepoName, D as cyan, Dt as runDockerForeground, E as bold, En as withErrorHandling, Et as getDockerCmd, F as ProviderRegistry, Ft as resolveApp, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_URL_LIMIT, H as cfnRefValueFromPhysicalId, Ht as stateBucketExistenceConfirmed, I as findActionableSilentDrops, It as resolveAutoAssetStorage, J as readConfigString, Jt as uploadCfnTemplate, K as resolveExplicitPhysicalId, Kt as MIGRATE_TMP_PREFIX, L as CloudControlProvider, Lt as resolveCaptureObservedState, M as IAMRoleProvider, Mt as synthesisStatusMessage, N as collectInlinePolicyNamesManagedBySiblings, Nt as getDefaultStateBucketName, O as gray, Ot as runDockerStreaming, P as clearOnUpdateRemoval, Pt as getLegacyStateBucketName, Q as applyRoleArnIfSet, R as slowCcOperationTimeoutMs, Rt as resolveSkipPrefix, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateAssetBucketName, T as formatResourceLine, Tn as normalizeAwsError, Tt as formatDockerLoginError, U as refStateLookupFromResource, Ut as warnDeprecatedNoPrefixCliFlag, V as IntrinsicFunctionResolver, Vt as resolveUseCdkBootstrapAssets, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_BODY_LIMIT, X as requireConfigArray, Xt as AssemblyReader, Y as replayWarn, Yt as expectedOwnerParam, Z as requireConfigString, Zt as processStackMessages, _ as createPreDeleteFinalSnapshot, _n as ResourceTimeoutError, _t as AssetModeResolver, a as DeploymentEventsStore, an as CdkdError, at as TemplateParser, b as unsupportedFinalSnapshotError, bn as StackTerminationProtectionError, bt as getBootstrapMarkerKey, c as replayFailedOperations, cn as DeployCancelledError, ct as rebuildClientForBucketRegion, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalStartServiceError, dt as stringifyValue, en as AwsClients, et as describeTypeWithThrottleRetry, f as computeImplicitDeleteEdges, ft as WorkGraph, g as ccRoutedFinalSnapshotError, gn as ProvisioningError, gt as rewriteTemplateAssetReferences, h as buildFinalSnapshotIdentifier, hn as PartialFailureError, ht as loadPublishableAssetManifest, i as DeploymentEventsReader, it as DagBuilder, j as yellow, jt as Synthesizer, k as green, kt as AssetManifestLoader, l as replayRollback, ln as LocalInvokeBuildError$1, lt as shouldRetainResource, m as PRE_DELETE_SNAPSHOT_TYPES, mn as NestedStackChildDirectDestroyError, mt as createAssetRedirectResolver, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resetAwsClients, nt as isRetryableTransientError, o as planFailedOps, ot as LockManager, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as MissingCdkCliError, pt as buildAssetRedirectMap, q as assertRegionMatch, qt as findLargeInlineResources, r as DeployEngine, rn as setAwsClients, rt as isThrottlingError, s as planRollback, st as S3StateBackend, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as getAwsClients, tt as withRetry, u as withResourceDeadline, un as LocalMigrateError, ut as AssetPublisher, v as isFinalSnapshotError, vn as ResourceUpdateNotSupportedError, vt as BOOTSTRAP_MARKER_PREFIX, w as renderStatefulReason, wt as buildDockerImage, x as extractDeploymentEventError, xt as parseBootstrapMarker, y as refusesFinalSnapshot, yn as StackHasActiveImportsError, yt as ensureAssetStorage, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefault } from "./deploy-engine-D2mbS9va.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BYMEE-BS.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-C217C6UE.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
7
7
|
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, 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";
|
|
@@ -7823,7 +7823,7 @@ var SNSTopicProvider = class {
|
|
|
7823
7823
|
}
|
|
7824
7824
|
}
|
|
7825
7825
|
if (JSON.stringify(properties["DeliveryStatusLogging"]) !== JSON.stringify(previousProperties["DeliveryStatusLogging"])) {
|
|
7826
|
-
const desiredAttributes = buildDeliveryStatusAttributeMap(properties["DeliveryStatusLogging"], logicalId, "
|
|
7826
|
+
const desiredAttributes = buildDeliveryStatusAttributeMap(properties["DeliveryStatusLogging"], logicalId, "warn");
|
|
7827
7827
|
const previousAttributes = buildDeliveryStatusAttributeMap(previousProperties["DeliveryStatusLogging"], logicalId, "skip");
|
|
7828
7828
|
for (const [attributeName, attributeValue] of desiredAttributes) {
|
|
7829
7829
|
if (previousAttributes.get(attributeName) === attributeValue) continue;
|
|
@@ -8205,11 +8205,24 @@ const SNS_DELIVERY_STATUS_ATTRIBUTE_SUFFIXES = [
|
|
|
8205
8205
|
* rate on create and update alike).
|
|
8206
8206
|
*
|
|
8207
8207
|
* `onMalformed` picks the failure mode for a malformed container / entry
|
|
8208
|
-
* / unknown protocol
|
|
8209
|
-
*
|
|
8210
|
-
*
|
|
8211
|
-
* the
|
|
8212
|
-
*
|
|
8208
|
+
* / unknown protocol, and encodes the create-vs-update distinction
|
|
8209
|
+
* (issue #1538):
|
|
8210
|
+
*
|
|
8211
|
+
* - `'throw'` — the CREATE desired side, which is always template-borne:
|
|
8212
|
+
* a template error must fail fast, naming the offending value.
|
|
8213
|
+
* - `'warn'` — the UPDATE desired side, which is NOT always template-borne:
|
|
8214
|
+
* the rollback executor's revert arm and `cdkd drift --revert` both call
|
|
8215
|
+
* `update()` with a state-derived bag as the DESIRED properties, so a
|
|
8216
|
+
* state record carrying an unsupported protocol / malformed shape (a
|
|
8217
|
+
* hand-written imported template, or a record an older binary wrote)
|
|
8218
|
+
* must warn-and-skip rather than fail the update permanently — there is
|
|
8219
|
+
* no template-side remedy. Skip semantics are well-defined: an entry
|
|
8220
|
+
* whose protocol cannot be canonicalized maps to no attribute names, a
|
|
8221
|
+
* non-array container yields an empty map, and a non-object entry is
|
|
8222
|
+
* skipped. Each warning names the logicalId and the offending value.
|
|
8223
|
+
* - `'skip'` — the PREVIOUS side (cdkd state): same tolerance, silently —
|
|
8224
|
+
* warning on every update about a value the user cannot act on from the
|
|
8225
|
+
* template would be pure noise (guard-the-desired-side-only rule).
|
|
8213
8226
|
*
|
|
8214
8227
|
* Two entries whose `Protocol` values canonicalize to the SAME prefix
|
|
8215
8228
|
* (`http/s` + `https`, say) collapse onto one set of attribute names. The
|
|
@@ -8223,38 +8236,46 @@ const SNS_DELIVERY_STATUS_ATTRIBUTE_SUFFIXES = [
|
|
|
8223
8236
|
* produced `HTTPS*` names AWS rejected outright, so no such template ever
|
|
8224
8237
|
* deployed.
|
|
8225
8238
|
*
|
|
8226
|
-
* The collision WARNS rather than throws
|
|
8227
|
-
* side is also fed by the rollback executor's
|
|
8228
|
-
* STATE record, where the user has no
|
|
8229
|
-
*
|
|
8230
|
-
* non-object entry)
|
|
8231
|
-
*
|
|
8232
|
-
*
|
|
8233
|
-
*
|
|
8234
|
-
*
|
|
8239
|
+
* The collision WARNS rather than throws for the same reason `'warn'` mode
|
|
8240
|
+
* exists: the update desired side is also fed by the rollback executor's
|
|
8241
|
+
* `update()` replay of a cdkd STATE record, where the user has no
|
|
8242
|
+
* template-side remedy. The three malformed-value sites below (unsupported
|
|
8243
|
+
* protocol, non-array container, non-object entry) used to throw on that
|
|
8244
|
+
* side too, which made such a state record permanently unreplayable —
|
|
8245
|
+
* fixed by issue #1538, which moved `update()`'s desired side to `'warn'`
|
|
8246
|
+
* while `create()` keeps `'throw'` (a template create must still fail
|
|
8247
|
+
* fast; #1529 / #1536 deliberately left that contract unchanged).
|
|
8235
8248
|
*/
|
|
8236
8249
|
function buildDeliveryStatusAttributeMap(logging, logicalId, onMalformed) {
|
|
8237
8250
|
const map = /* @__PURE__ */ new Map();
|
|
8238
8251
|
if (logging == null) return map;
|
|
8252
|
+
const warn = (message) => {
|
|
8253
|
+
getLogger().child("SNSTopicProvider").warn(message);
|
|
8254
|
+
};
|
|
8239
8255
|
const seenProtocols = /* @__PURE__ */ new Set();
|
|
8240
8256
|
if (!Array.isArray(logging)) {
|
|
8241
|
-
if (onMalformed === "
|
|
8242
|
-
|
|
8257
|
+
if (onMalformed === "throw") throw new Error(`SNS topic ${logicalId}: DeliveryStatusLogging must be an array of {Protocol, ...} objects, got ${JSON.stringify(logging)}`);
|
|
8258
|
+
if (onMalformed === "warn") warn(`SNS topic ${logicalId}: DeliveryStatusLogging must be an array of {Protocol, ...} objects, got ${JSON.stringify(logging)} — treating it as empty for this update, so previously set delivery-status attributes are reset. The desired properties can come from a cdkd state record (rollback replay / drift --revert), so this does not fail the update; fix the template (or the state record on a replay) to clear this warning.`);
|
|
8259
|
+
return map;
|
|
8243
8260
|
}
|
|
8244
8261
|
for (const entry of logging) {
|
|
8245
8262
|
if (entry == null || typeof entry !== "object" || Array.isArray(entry)) {
|
|
8246
|
-
if (onMalformed === "
|
|
8247
|
-
|
|
8263
|
+
if (onMalformed === "throw") throw new Error(`SNS topic ${logicalId}: DeliveryStatusLogging entries must be {Protocol, ...} objects, got ${JSON.stringify(entry)}`);
|
|
8264
|
+
if (onMalformed === "warn") warn(`SNS topic ${logicalId}: skipping DeliveryStatusLogging entry ${JSON.stringify(entry)} — entries must be {Protocol, ...} objects. Attributes previously set for the skipped entry's protocol are reset, as if the entry had been removed.`);
|
|
8265
|
+
continue;
|
|
8248
8266
|
}
|
|
8249
8267
|
const config = entry;
|
|
8250
8268
|
let protocol;
|
|
8251
8269
|
if (onMalformed === "throw") protocol = normalizeDeliveryStatusProtocolOrThrow(config["Protocol"], logicalId);
|
|
8252
8270
|
else {
|
|
8253
8271
|
const normalized = normalizeDeliveryStatusProtocol(config["Protocol"]);
|
|
8254
|
-
if (normalized === void 0)
|
|
8272
|
+
if (normalized === void 0) {
|
|
8273
|
+
if (onMalformed === "warn") warn(`SNS topic ${logicalId}: skipping DeliveryStatusLogging entry with unsupported protocol ${JSON.stringify(config["Protocol"])}. Expected one of ${SNS_DELIVERY_STATUS_PROTOCOL_SPELLINGS.join(", ")} (case-insensitive). Attributes previously set for the skipped entry's protocol are reset, as if the entry had been removed.`);
|
|
8274
|
+
continue;
|
|
8275
|
+
}
|
|
8255
8276
|
protocol = normalized;
|
|
8256
8277
|
}
|
|
8257
|
-
if (onMalformed
|
|
8278
|
+
if (onMalformed !== "skip" && seenProtocols.has(protocol)) warn(`SNS topic ${logicalId}: DeliveryStatusLogging declares more than one entry for the "${protocol}" attribute prefix (${JSON.stringify(config["Protocol"])} canonicalizes to it). AWS has one attribute set per prefix, so these are merged per field — a later entry overwrites only the sub-fields it declares, and a field it omits keeps the earlier entry's value. Declare a single entry per protocol.`);
|
|
8258
8279
|
seenProtocols.add(protocol);
|
|
8259
8280
|
for (const suffix of SNS_DELIVERY_STATUS_ATTRIBUTE_SUFFIXES) {
|
|
8260
8281
|
const value = config[suffix];
|
|
@@ -8330,10 +8351,13 @@ function normalizeDeliveryStatusProtocol(input) {
|
|
|
8330
8351
|
}
|
|
8331
8352
|
}
|
|
8332
8353
|
/**
|
|
8333
|
-
* Variant used by `create()`
|
|
8334
|
-
*
|
|
8335
|
-
*
|
|
8336
|
-
* `InvalidParameter`
|
|
8354
|
+
* Variant used by `create()` (the `'throw'` mode of
|
|
8355
|
+
* `buildDeliveryStatusAttributeMap`) to fail fast when a template carries
|
|
8356
|
+
* an unknown protocol. Throws a clear error naming the offending value so
|
|
8357
|
+
* the user sees what to fix instead of AWS's generic `InvalidParameter`
|
|
8358
|
+
* rejection. `update()`'s desired side warns-and-skips instead (issue
|
|
8359
|
+
* #1538) because its bag can be a cdkd state record on a rollback replay
|
|
8360
|
+
* or `drift --revert`.
|
|
8337
8361
|
*/
|
|
8338
8362
|
function normalizeDeliveryStatusProtocolOrThrow(input, logicalId) {
|
|
8339
8363
|
const normalized = normalizeDeliveryStatusProtocol(input);
|
|
@@ -9910,11 +9934,11 @@ var LambdaUrlProvider = class {
|
|
|
9910
9934
|
/**
|
|
9911
9935
|
* Create a Lambda Function URL
|
|
9912
9936
|
*/
|
|
9913
|
-
async create(logicalId, resourceType, properties) {
|
|
9937
|
+
async create(logicalId, resourceType, properties, context) {
|
|
9914
9938
|
this.logger.debug(`Creating Lambda URL ${logicalId}`);
|
|
9915
9939
|
const targetFunctionArn = properties["TargetFunctionArn"];
|
|
9916
9940
|
if (!targetFunctionArn) throw new ProvisioningError(`TargetFunctionArn is required for Lambda URL ${logicalId}`, resourceType, logicalId);
|
|
9917
|
-
const authType = requireConfigString(properties["AuthType"], "NONE", "AWS::Lambda::Url AuthType");
|
|
9941
|
+
const authType = requireConfigString(properties["AuthType"], "NONE", "AWS::Lambda::Url AuthType", replayWarn(this.logger, context));
|
|
9918
9942
|
try {
|
|
9919
9943
|
const cors = properties["Cors"];
|
|
9920
9944
|
const createParams = {
|
|
@@ -11519,7 +11543,7 @@ var DynamoDBTableProvider = class {
|
|
|
11519
11543
|
/**
|
|
11520
11544
|
* Create a DynamoDB table
|
|
11521
11545
|
*/
|
|
11522
|
-
async create(logicalId, resourceType, properties) {
|
|
11546
|
+
async create(logicalId, resourceType, properties, context) {
|
|
11523
11547
|
this.logger.debug(`Creating DynamoDB table ${logicalId}`);
|
|
11524
11548
|
const tableName = properties["TableName"] || generateResourceName(logicalId, { maxLength: 255 });
|
|
11525
11549
|
const keySchema = properties["KeySchema"];
|
|
@@ -11528,7 +11552,7 @@ var DynamoDBTableProvider = class {
|
|
|
11528
11552
|
if (!attributeDefinitions) throw new ProvisioningError(`AttributeDefinitions is required for DynamoDB table ${logicalId}`, resourceType, logicalId);
|
|
11529
11553
|
let tableCreated = false;
|
|
11530
11554
|
try {
|
|
11531
|
-
const billingMode = properties["BillingMode"]
|
|
11555
|
+
const billingMode = requireConfigString(properties["BillingMode"], "PROVISIONED", "AWS::DynamoDB::Table BillingMode", replayWarn(this.logger, context));
|
|
11532
11556
|
const createParams = {
|
|
11533
11557
|
TableName: tableName,
|
|
11534
11558
|
KeySchema: keySchema,
|
|
@@ -11602,9 +11626,15 @@ var DynamoDBTableProvider = class {
|
|
|
11602
11626
|
if (table?.TableArn) await this.applyTagDiff(table.TableArn, previousProperties["Tags"], properties["Tags"]);
|
|
11603
11627
|
const normalizeTableClass = (v) => typeof v === "string" && v.length > 0 ? v : "STANDARD";
|
|
11604
11628
|
const tableClassChanged = normalizeTableClass(properties["TableClass"]) !== normalizeTableClass(previousProperties["TableClass"]);
|
|
11605
|
-
const
|
|
11629
|
+
const prevBillingMode = previousProperties["BillingMode"];
|
|
11630
|
+
let billingModeUnusable = false;
|
|
11631
|
+
const requestedBillingMode = properties["BillingMode"] === void 0 ? void 0 : requireConfigString(properties["BillingMode"], "PROVISIONED", "AWS::DynamoDB::Table BillingMode", { onUnusable: (message) => {
|
|
11632
|
+
billingModeUnusable = true;
|
|
11633
|
+
this.logger.warn(`${message} The table's current billing mode${prevBillingMode ? ` (${prevBillingMode})` : ""} is kept for this update rather than flipped to the default.`);
|
|
11634
|
+
} });
|
|
11635
|
+
const billingMode = billingModeUnusable ? prevBillingMode : requestedBillingMode;
|
|
11636
|
+
const billingOrThroughputChanged = JSON.stringify(billingMode) !== JSON.stringify(prevBillingMode) || JSON.stringify(properties["ProvisionedThroughput"]) !== JSON.stringify(previousProperties["ProvisionedThroughput"]);
|
|
11606
11637
|
if (billingOrThroughputChanged || tableClassChanged) {
|
|
11607
|
-
const billingMode = properties["BillingMode"];
|
|
11608
11638
|
const updateInput = { TableName: physicalId };
|
|
11609
11639
|
if (billingOrThroughputChanged && billingMode) updateInput.BillingMode = billingMode;
|
|
11610
11640
|
if (tableClassChanged) updateInput.TableClass = normalizeTableClass(properties["TableClass"]);
|
|
@@ -12557,7 +12587,7 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
12557
12587
|
if (streamSpecInput != null) {
|
|
12558
12588
|
let streamViewType;
|
|
12559
12589
|
try {
|
|
12560
|
-
streamViewType = readConfigString(streamSpecInput, "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification");
|
|
12590
|
+
streamViewType = readConfigString(streamSpecInput, "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification", replayWarn(this.logger, context));
|
|
12561
12591
|
} catch (error) {
|
|
12562
12592
|
throw new ProvisioningError(error instanceof Error ? error.message : String(error), resourceType, logicalId, void 0, error instanceof Error ? error : void 0);
|
|
12563
12593
|
}
|
|
@@ -12574,7 +12604,7 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
12574
12604
|
}
|
|
12575
12605
|
let sdkIndexes;
|
|
12576
12606
|
try {
|
|
12577
|
-
sdkIndexes = toSdkGlobalSecondaryIndexes(properties, currentRegion, billingMode, "min", diagnostics);
|
|
12607
|
+
sdkIndexes = toSdkGlobalSecondaryIndexes(properties, currentRegion, billingMode, "min", diagnostics, replayWarn(this.logger, context).onUnusable);
|
|
12578
12608
|
} catch (error) {
|
|
12579
12609
|
throw new ProvisioningError(error instanceof Error ? error.message : String(error), resourceType, logicalId, void 0, error instanceof Error ? error : void 0);
|
|
12580
12610
|
}
|
|
@@ -14554,9 +14584,16 @@ function pickAutoScalingCapacity(autoScaling, source) {
|
|
|
14554
14584
|
* written before this fix (and hand-authored templates) can carry them, and
|
|
14555
14585
|
* silently re-deriving over an explicit value would be a regression.
|
|
14556
14586
|
*/
|
|
14557
|
-
function toSdkGlobalSecondaryIndexes(properties, region, billingMode, source = "min", diagnostics) {
|
|
14587
|
+
function toSdkGlobalSecondaryIndexes(properties, region, billingMode, source = "min", diagnostics, onUnusableIndexes) {
|
|
14558
14588
|
const rawIndexes = properties["GlobalSecondaryIndexes"];
|
|
14559
|
-
if (rawIndexes !== void 0 && !Array.isArray(rawIndexes))
|
|
14589
|
+
if (rawIndexes !== void 0 && !Array.isArray(rawIndexes)) {
|
|
14590
|
+
const shapeDetail = `AWS::DynamoDB::GlobalTable GlobalSecondaryIndexes must be an array, got ${typeof rawIndexes} (${JSON.stringify(rawIndexes)?.slice(0, 200)}).`;
|
|
14591
|
+
if (onUnusableIndexes) {
|
|
14592
|
+
onUnusableIndexes(`${shapeDetail} Omitting the malformed block, so this create carries NO indexes; the same value is REFUSED on a template-path create`);
|
|
14593
|
+
return [];
|
|
14594
|
+
}
|
|
14595
|
+
throw new Error(`${shapeDetail} An unresolved intrinsic here would otherwise deploy a table with no indexes.`);
|
|
14596
|
+
}
|
|
14560
14597
|
const cfnIndexes = rawIndexes ?? [];
|
|
14561
14598
|
if (cfnIndexes.length === 0) return [];
|
|
14562
14599
|
const replicas = properties["Replicas"] ?? [];
|
|
@@ -44575,9 +44612,9 @@ var S3DirectoryBucketProvider = class {
|
|
|
44575
44612
|
/**
|
|
44576
44613
|
* Create an S3 Express Directory Bucket
|
|
44577
44614
|
*/
|
|
44578
|
-
async create(logicalId, resourceType, properties) {
|
|
44615
|
+
async create(logicalId, resourceType, properties, context) {
|
|
44579
44616
|
this.logger.debug(`Creating S3 Express Directory Bucket ${logicalId}`);
|
|
44580
|
-
const dataRedundancy = requireConfigString(properties["DataRedundancy"], "SingleAvailabilityZone", "AWS::S3Express::DirectoryBucket DataRedundancy");
|
|
44617
|
+
const dataRedundancy = requireConfigString(properties["DataRedundancy"], "SingleAvailabilityZone", "AWS::S3Express::DirectoryBucket DataRedundancy", replayWarn(this.logger, context));
|
|
44581
44618
|
const azName = properties["LocationName"]?.replace(/--x-s3$/, "") || "us-east-1a";
|
|
44582
44619
|
const azId = await this.getAzId(azName);
|
|
44583
44620
|
let bucketName = properties["BucketName"];
|
|
@@ -67565,7 +67602,7 @@ function createMigrateCommand() {
|
|
|
67565
67602
|
*/
|
|
67566
67603
|
function buildProgram() {
|
|
67567
67604
|
const program = new Command();
|
|
67568
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.
|
|
67605
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.50");
|
|
67569
67606
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
67570
67607
|
const { profile } = actionCommand.optsWithGlobals();
|
|
67571
67608
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|