@go-to-k/cdkd 0.278.15 → 0.278.17

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/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as DagBuilder, A as red, At as resolveApp, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_URL_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerStreaming, D as cyan, Dt as synthesisStatusMessage, E as bold, Et as Synthesizer, F as ProviderRegistry, Ft as resolveStateBucketWithDefaultAndSource, G as normalizeAwsTagsToCfn, Gt as AssemblyReader, H as cfnRefValueFromPhysicalId, Ht as findLargeInlineResources, I as findActionableSilentDrops, It as resolveUseCdkBootstrapAssets, J as applyRoleArnIfSet, Jt as resolveBucketRegion, K as resolveExplicitPhysicalId, Kt as processStackMessages, L as CloudControlProvider, Lt as stateBucketExistenceConfirmed, M as IAMRoleProvider, Mt as resolveCaptureObservedState, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveSkipPrefix, O as gray, Ot as getDefaultStateBucketName, P as clearOnUpdateRemoval, Pt as resolveStateBucketWithDefault, Q as isRetryableTransientError, Qt as setAwsClients, R as slowCcOperationTimeoutMs, Rt as warnDeprecatedNoPrefixCliFlag, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as runDockerForeground, T as formatResourceLine, Tt as getDockerImageBySourceHash, U as refStateLookupFromResource, Ut as uploadCfnTemplate, V as IntrinsicFunctionResolver, Vt as MIGRATE_TMP_PREFIX, W as WAFv2WebACLProvider, Wt as expectedOwnerParam, X as describeTypeWithThrottleRetry, Xt as getAwsClients, Y as DiffCalculator, Yt as AwsClients, Z as withRetry, Zt as resetAwsClients, _ as createPreDeleteFinalSnapshot, _t as validateAssetBucketName, a as DeploymentEventsStore, an as LocalMigrateError, at as AssetPublisher, b as unsupportedFinalSnapshotError, bn as normalizeAwsError, bt as formatDockerLoginError, c as replayFailedOperations, cn as MissingCdkCliError, ct as buildAssetRedirectMap, d as IMPLICIT_DELETE_DEPENDENCIES, dn as ProvisioningError, dt as rewriteTemplateAssetReferences, en as CdkdError, et as TemplateParser, f as computeImplicitDeleteEdges, fn as ResourceTimeoutError, ft as AssetModeResolver, g as ccRoutedFinalSnapshotError, gt as parseBootstrapMarker, h as buildFinalSnapshotIdentifier, hn as StackTerminationProtectionError, ht as getBootstrapMarkerKey, i as DeploymentEventsReader, in as LocalInvokeBuildError$1, it as shouldRetainResource, j as yellow, jt as resolveAutoAssetStorage, k as green, kt as getLegacyStateBucketName, l as replayRollback, ln as NestedStackChildDirectDestroyError, lt as createAssetRedirectResolver, m as PRE_DELETE_SNAPSHOT_TYPES, mn as StackHasActiveImportsError, mt as ensureAssetStorage, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as S3StateBackend, o as planFailedOps, on as LocalStartServiceError, ot as stringifyValue, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceUpdateNotSupportedError, pt as BOOTSTRAP_MARKER_PREFIX, q as assertRegionMatch, r as DeployEngine, rn as DeployCancelledError, rt as rebuildClientForBucketRegion, s as planRollback, st as WorkGraph, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LockManager, u as withResourceDeadline, un as PartialFailureError, ut as loadPublishableAssetManifest, v as isFinalSnapshotError, vt as validateContainerRepoName, w as renderStatefulReason, wt as AssetManifestLoader, x as extractDeploymentEventError, xn as withErrorHandling, xt as getDockerCmd, y as refusesFinalSnapshot, yt as buildDockerImage, z as disableInstanceApiTermination, zt as CFN_TEMPLATE_BODY_LIMIT } from "./deploy-engine-Bb3aRJ2Y.js";
2
+ import { $ as DagBuilder, A as red, At as resolveApp, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_URL_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerStreaming, D as cyan, Dt as synthesisStatusMessage, E as bold, Et as Synthesizer, F as ProviderRegistry, Ft as resolveStateBucketWithDefaultAndSource, G as normalizeAwsTagsToCfn, Gt as AssemblyReader, H as cfnRefValueFromPhysicalId, Ht as findLargeInlineResources, I as findActionableSilentDrops, It as resolveUseCdkBootstrapAssets, J as applyRoleArnIfSet, Jt as resolveBucketRegion, K as resolveExplicitPhysicalId, Kt as processStackMessages, L as CloudControlProvider, Lt as stateBucketExistenceConfirmed, M as IAMRoleProvider, Mt as resolveCaptureObservedState, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveSkipPrefix, O as gray, Ot as getDefaultStateBucketName, P as clearOnUpdateRemoval, Pt as resolveStateBucketWithDefault, Q as isRetryableTransientError, Qt as setAwsClients, R as slowCcOperationTimeoutMs, Rt as warnDeprecatedNoPrefixCliFlag, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as runDockerForeground, T as formatResourceLine, Tt as getDockerImageBySourceHash, U as refStateLookupFromResource, Ut as uploadCfnTemplate, V as IntrinsicFunctionResolver, Vt as MIGRATE_TMP_PREFIX, W as WAFv2WebACLProvider, Wt as expectedOwnerParam, X as describeTypeWithThrottleRetry, Xt as getAwsClients, Y as DiffCalculator, Yt as AwsClients, Z as withRetry, Zt as resetAwsClients, _ as createPreDeleteFinalSnapshot, _t as validateAssetBucketName, a as DeploymentEventsStore, an as LocalMigrateError, at as AssetPublisher, b as unsupportedFinalSnapshotError, bn as normalizeAwsError, bt as formatDockerLoginError, c as replayFailedOperations, cn as MissingCdkCliError, ct as buildAssetRedirectMap, d as IMPLICIT_DELETE_DEPENDENCIES, dn as ProvisioningError, dt as rewriteTemplateAssetReferences, en as CdkdError, et as TemplateParser, f as computeImplicitDeleteEdges, fn as ResourceTimeoutError, ft as AssetModeResolver, g as ccRoutedFinalSnapshotError, gt as parseBootstrapMarker, h as buildFinalSnapshotIdentifier, hn as StackTerminationProtectionError, ht as getBootstrapMarkerKey, i as DeploymentEventsReader, in as LocalInvokeBuildError$1, it as shouldRetainResource, j as yellow, jt as resolveAutoAssetStorage, k as green, kt as getLegacyStateBucketName, l as replayRollback, ln as NestedStackChildDirectDestroyError, lt as createAssetRedirectResolver, m as PRE_DELETE_SNAPSHOT_TYPES, mn as StackHasActiveImportsError, mt as ensureAssetStorage, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as S3StateBackend, o as planFailedOps, on as LocalStartServiceError, ot as stringifyValue, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceUpdateNotSupportedError, pt as BOOTSTRAP_MARKER_PREFIX, q as assertRegionMatch, r as DeployEngine, rn as DeployCancelledError, rt as rebuildClientForBucketRegion, s as planRollback, st as WorkGraph, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LockManager, u as withResourceDeadline, un as PartialFailureError, ut as loadPublishableAssetManifest, v as isFinalSnapshotError, vt as validateContainerRepoName, w as renderStatefulReason, wt as AssetManifestLoader, x as extractDeploymentEventError, xn as withErrorHandling, xt as getDockerCmd, y as refusesFinalSnapshot, yt as buildDockerImage, z as disableInstanceApiTermination, zt as CFN_TEMPLATE_BODY_LIMIT } from "./deploy-engine-C37xsRjc.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-Dwf9PnS6.js";
4
+ import { t as ASGProvider } from "./asg-provider-1Aaq8WrB.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, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, 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";
@@ -12383,6 +12383,9 @@ var DynamoDBGlobalTableProvider = class {
12383
12383
  return (props["Replicas"] ?? []).find((r) => r["Region"] === currentRegion)?.["Tags"];
12384
12384
  };
12385
12385
  if (tableArn) await this.applyTagDiff(tableArn, extractLocalTags(previousProperties), extractLocalTags(properties));
12386
+ const oldBilling = previousProperties["BillingMode"] ?? "PAY_PER_REQUEST";
12387
+ const newBilling = properties["BillingMode"] ?? "PAY_PER_REQUEST";
12388
+ const onDemandCeilingLive = oldBilling === "PAY_PER_REQUEST" && newBilling === "PAY_PER_REQUEST";
12386
12389
  const newDpe = extractLocalDeletionProtection(properties, currentRegion);
12387
12390
  const oldDpe = extractLocalDeletionProtection(previousProperties, currentRegion);
12388
12391
  const awsDpe = describeResp.Table?.DeletionProtectionEnabled;
@@ -12414,8 +12417,13 @@ var DynamoDBGlobalTableProvider = class {
12414
12417
  }
12415
12418
  if (!deepEqual$1(properties["WriteOnDemandThroughputSettings"], previousProperties["WriteOnDemandThroughputSettings"])) {
12416
12419
  const wodts = properties["WriteOnDemandThroughputSettings"];
12417
- if (wodts?.["MaxWriteRequestUnits"] !== void 0) {
12418
- flatUpdate.OnDemandThroughput = { MaxWriteRequestUnits: Number(wodts["MaxWriteRequestUnits"]) };
12420
+ const previousWodts = previousProperties["WriteOnDemandThroughputSettings"];
12421
+ const rawMaxWrite = wodts?.["MaxWriteRequestUnits"];
12422
+ if (rawMaxWrite !== void 0) {
12423
+ flatUpdate.OnDemandThroughput = { MaxWriteRequestUnits: Number(rawMaxWrite) };
12424
+ flatChanged = true;
12425
+ } else if (onDemandCeilingLive && previousWodts?.["MaxWriteRequestUnits"] !== void 0) {
12426
+ flatUpdate.OnDemandThroughput = { MaxWriteRequestUnits: ON_DEMAND_LIMIT_RESET };
12419
12427
  flatChanged = true;
12420
12428
  }
12421
12429
  }
@@ -12423,8 +12431,6 @@ var DynamoDBGlobalTableProvider = class {
12423
12431
  await this.dynamoDBClient.send(new UpdateTableCommand(flatUpdate));
12424
12432
  await this.waitForTableActiveAfterUpdate(physicalId, logicalId);
12425
12433
  }
12426
- const oldBilling = previousProperties["BillingMode"] ?? "PAY_PER_REQUEST";
12427
- const newBilling = properties["BillingMode"] ?? "PAY_PER_REQUEST";
12428
12434
  const gsiHandledByBillingFlip = /* @__PURE__ */ new Set();
12429
12435
  if (oldBilling !== newBilling) {
12430
12436
  const billingUpdate = {
@@ -13648,10 +13654,36 @@ var LogsLogGroupProvider = class {
13648
13654
  "DataProtectionPolicy",
13649
13655
  "LogGroupClass",
13650
13656
  "FieldIndexPolicies",
13651
- "ResourcePolicyDocument",
13652
13657
  "DeletionProtectionEnabled",
13653
13658
  "BearerTokenAuthenticationEnabled"
13654
13659
  ])]]);
13660
+ /**
13661
+ * Issue #1412. `ResourcePolicyDocument` used to sit in
13662
+ * {@link handledProperties} purely to keep the log group off the Cloud
13663
+ * Control fallback path — but nothing ever wired it, so a template setting
13664
+ * it deployed "successfully" with the policy silently discarded (the
13665
+ * #1392 silent-drop class the `handled-property-wiring` critic exists to
13666
+ * catch).
13667
+ *
13668
+ * It cannot be honestly wired from here. The value maps to the SEPARATE
13669
+ * `AWS::Logs::ResourcePolicy` resource type, whose CloudWatch Logs API
13670
+ * counterpart (`PutResourcePolicy` / `DeleteResourcePolicy`) is
13671
+ * **account-wide**, not per-log-group: the policy is keyed by a policy NAME
13672
+ * in the account, not by the log group. Owning it from the log group's
13673
+ * lifecycle would mean inventing an ownership/lifecycle answer cdkd has no
13674
+ * basis for — which policy name to claim, what to do on delete when the
13675
+ * account-wide policy may be shared, and how to resolve two log groups
13676
+ * declaring conflicting documents. Managing the sibling
13677
+ * `AWS::Logs::ResourcePolicy` resource is a separate feature (option 1 in
13678
+ * issue #1412), deliberately not attempted here.
13679
+ *
13680
+ * Declaring the drop instead makes the omission visible: the #614 routing
13681
+ * pass sends any log group whose template sets `ResourcePolicyDocument`
13682
+ * through the Cloud Control fallback, where AWS's own resource handler
13683
+ * applies the policy. This provider does NOT set `disableCcApiFallback`,
13684
+ * so that route is always available and no template is hard-rejected.
13685
+ */
13686
+ unhandledByDesign = /* @__PURE__ */ new Map([["AWS::Logs::LogGroup", /* @__PURE__ */ new Map([["ResourcePolicyDocument", "covered by the separate account-wide AWS::Logs::ResourcePolicy resource type; logs:PutResourcePolicy is account-scoped, not per-log-group, so it has no CreateLogGroup / PutRetentionPolicy counterpart — routed via Cloud Control instead"]])]]);
13655
13687
  constructor() {
13656
13688
  const awsClients = getAwsClients();
13657
13689
  this.logsClient = awsClients.cloudWatchLogs;
@@ -13924,9 +13956,11 @@ var LogsLogGroupProvider = class {
13924
13956
  * `deletionProtectionEnabled` / `bearerTokenAuthenticationEnabled`),
13925
13957
  * and `FieldIndexPolicies` (via `DescribeIndexPolicies`, filtered to
13926
13958
  * log-group-level policies and JSON-parsed). Still out of scope:
13927
- * `ResourcePolicyDocument` (managed by the separate
13928
- * `AWS::Logs::ResourcePolicy` resource type — account-wide, not
13929
- * per-log-group).
13959
+ * `ResourcePolicyDocument`, which is declared in
13960
+ * {@link unhandledByDesign} (issue #1412) — it is managed by the separate
13961
+ * account-wide `AWS::Logs::ResourcePolicy` resource type, so a log group
13962
+ * whose template sets it routes via Cloud Control rather than through this
13963
+ * provider at all.
13930
13964
  *
13931
13965
  * Write-side coverage: `FieldIndexPolicies` is applied via
13932
13966
  * `PutIndexPolicy` (CloudWatch Logs allows at most one log-group-level
@@ -15909,7 +15943,6 @@ var EC2Provider = class {
15909
15943
  "SecondaryAllocationIds",
15910
15944
  "SecondaryPrivateIpAddresses",
15911
15945
  "SecondaryPrivateIpAddressCount",
15912
- "MaxDrainDurationSeconds",
15913
15946
  "Tags"
15914
15947
  ])],
15915
15948
  ["AWS::EC2::RouteTable", /* @__PURE__ */ new Set(["VpcId", "Tags"])],
@@ -15981,7 +16014,7 @@ var EC2Provider = class {
15981
16014
  unhandledByDesign = /* @__PURE__ */ new Map([
15982
16015
  ["AWS::EC2::Instance", /* @__PURE__ */ new Map([["ElasticGpuSpecifications", "AWS Elastic GPU end-of-life (announced 2023-11); no replacement API"], ["ElasticInferenceAccelerators", "AWS Elastic Inference end-of-life 2024-04; use AWS Inferentia / Trainium accelerator instance families instead"]])],
15983
16016
  ["AWS::EC2::SecurityGroupIngress", /* @__PURE__ */ new Map([["GroupName", "EC2-Classic-only — use GroupId for VPC security groups (EC2-Classic retired 2022-08-15)"], ["SourceSecurityGroupName", "EC2-Classic-only — use SourceSecurityGroupId for VPC peer security groups (EC2-Classic retired 2022-08-15)"]])],
15984
- ["AWS::EC2::NatGateway", /* @__PURE__ */ new Map([["VpcId", "AWS derives the VPC from SubnetId; the ec2:CreateNatGateway API has no VpcId parameter"]])],
16017
+ ["AWS::EC2::NatGateway", /* @__PURE__ */ new Map([["VpcId", "AWS derives the VPC from SubnetId; the ec2:CreateNatGateway API has no VpcId parameter"], ["MaxDrainDurationSeconds", "write-only address-drain timeout with no CreateNatGateway member and no NAT gateway modify API; only ec2:DisassociateNatGatewayAddress / UnassignPrivateNatGatewayAddress accept it, and cdkd rejects NatGateway updates outright — routed via Cloud Control instead"]])],
15985
16018
  ["AWS::EC2::EIP", /* @__PURE__ */ new Map([
15986
16019
  ["Address", "Bring-your-own-IP: allocating a specific address you own is not yet supported; cdkd allocates an Amazon-owned address"],
15987
16020
  ["IpamPoolId", "Allocation from an IPAM pool is not yet supported"],
@@ -64983,7 +65016,7 @@ function createMigrateCommand() {
64983
65016
  */
64984
65017
  function buildProgram() {
64985
65018
  const program = new Command();
64986
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.15");
65019
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.17");
64987
65020
  program.hook("preAction", (_thisCommand, actionCommand) => {
64988
65021
  const { profile } = actionCommand.optsWithGlobals();
64989
65022
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;