@go-to-k/cdkd 0.96.0 → 0.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -455,6 +455,16 @@ v1 scope notes.
455
455
  `cdk deploy`, manual creation, or another tool) into cdkd state so the
456
456
  next `cdkd deploy` updates them in-place instead of CREATEing duplicates.
457
457
 
458
+ `cdkd import --migrate-from-cloudformation` extends this to migrate a
459
+ **whole CloudFormation stack** off CFn in a single command: cdkd reads
460
+ the source CFn stack's `(logicalId, physicalId)` mappings, adopts every
461
+ resource into cdkd state, then retires the source CFn stack (injects
462
+ `DeletionPolicy: Retain` + `UpdateReplacePolicy: Retain` on every
463
+ resource → `UpdateStack` → `DeleteStack`) so the AWS resources stay
464
+ intact but are no longer tracked by CFn. After the command finishes,
465
+ the stack is managed by `cdkd deploy`. This is the reverse direction
466
+ of `cdkd export` (see below).
467
+
458
468
  ```bash
459
469
  # Adopt a whole stack previously deployed by cdk deploy (tag-based auto-lookup).
460
470
  cdkd import MyStack --yes
@@ -479,17 +489,28 @@ AWS resources are unchanged across the migration; cdkd state for the
479
489
  exported stack is deleted on success. From then on the stack is managed
480
490
  by `cdk deploy` / `aws cloudformation`.
481
491
 
492
+ Lambda-backed Custom Resources (`Custom::*` and
493
+ `AWS::CloudFormation::CustomResource`) are NOT directly CFn-importable.
494
+ `cdkd export --include-non-importable` opts into a 2-phase migration
495
+ to handle them: phase 1 IMPORT changeset adopts every importable
496
+ resource, then phase 2 UPDATE changeset re-CREATEs the Custom Resources
497
+ through CFn — which re-invokes each backing Lambda's onCreate handler.
498
+ The Custom Resource Lambda must be idempotent AND must POST to
499
+ `event.ResponseURL` per the cfn-response protocol. Without the flag,
500
+ the command refuses to proceed and the user is expected to destroy
501
+ the offending resources (or accept abandoning them) first. Nested
502
+ `AWS::CloudFormation::Stack` references always block (CFn can neither
503
+ adopt nor recreate them).
504
+
482
505
  ```bash
483
506
  cdkd export MyStack # confirmation prompt; CFn stack name = cdkd stack name
484
507
  cdkd export MyStack --cfn-stack-name MyStack-CFn
485
508
  cdkd export MyStack --dry-run # print the import plan, do not call CFn
486
509
  cdkd export MyStack --template path.json # skip synth, use a pre-rendered JSON template
510
+ cdkd export MyStack --include-non-importable # 2-phase: IMPORT importable + CFn-CREATE Custom Resources
487
511
  ```
488
512
 
489
- MVP scope: JSON templates only (CDK-generated). The command refuses to
490
- proceed if any resource is not CFn-importable (Lambda-backed Custom
491
- Resources, nested `AWS::CloudFormation::Stack` references); destroy or
492
- accept abandoning those resources first.
513
+ MVP scope: JSON templates only (CDK-generated).
493
514
 
494
515
  ## Drift detection
495
516
 
package/dist/cli.js CHANGED
@@ -41837,7 +41837,7 @@ function reorderArgs(argv) {
41837
41837
  */
41838
41838
  async function main() {
41839
41839
  const program = new Command();
41840
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.95.0");
41840
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.96.1");
41841
41841
  program.addCommand(createBootstrapCommand());
41842
41842
  program.addCommand(createSynthCommand());
41843
41843
  program.addCommand(createListCommand());
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-to-k/cdkd",
3
- "version": "0.96.0",
3
+ "version": "0.97.0",
4
4
  "description": "CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
Binary file