@go-to-k/cdkd 0.10.0 → 0.12.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 +15 -4
- package/dist/cli.js +447 -204
- package/dist/cli.js.map +4 -4
- package/dist/go-to-k-cdkd-0.12.0.tgz +0 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.10.0.tgz +0 -0
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ Reproduce with `./tests/benchmark/run-benchmark.sh all`. See [tests/benchmark/RE
|
|
|
95
95
|
```
|
|
96
96
|
1. CLI Layer
|
|
97
97
|
├── Resolve --app (CLI > CDKD_APP env > cdk.json "app")
|
|
98
|
-
├── Resolve --state-bucket (CLI > env > cdk.json > auto: cdkd-state-{accountId}-{region})
|
|
98
|
+
├── Resolve --state-bucket (CLI > env > cdk.json > auto: cdkd-state-{accountId}, with legacy fallback to cdkd-state-{accountId}-{region})
|
|
99
99
|
└── Initialize AWS clients
|
|
100
100
|
|
|
101
101
|
2. Synthesis (self-implemented, no CDK CLI dependency)
|
|
@@ -355,7 +355,7 @@ cdkd diff
|
|
|
355
355
|
cdkd destroy
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
That's it. cdkd reads `--app` from `cdk.json` and auto-resolves the state bucket from your AWS account ID (`cdkd-state-{accountId}-{region}`).
|
|
358
|
+
That's it. cdkd reads `--app` from `cdk.json` and auto-resolves the state bucket from your AWS account ID (`cdkd-state-{accountId}`). If you bootstrapped under a previous cdkd version, the legacy region-suffixed name (`cdkd-state-{accountId}-{region}`) is still picked up automatically with a deprecation warning.
|
|
359
359
|
|
|
360
360
|
## Usage
|
|
361
361
|
|
|
@@ -407,7 +407,6 @@ cdkd deploy -c env=staging -c featureFlag=true
|
|
|
407
407
|
cdkd deploy MyStack \
|
|
408
408
|
--app "npx ts-node app.ts" \
|
|
409
409
|
--state-bucket my-cdkd-state \
|
|
410
|
-
--region us-east-1 \
|
|
411
410
|
--verbose
|
|
412
411
|
|
|
413
412
|
# Show diff (what would change)
|
|
@@ -447,8 +446,20 @@ cdkd state show MyStack --json # raw {state, lock} JSON
|
|
|
447
446
|
cdkd state rm MyStack # confirmation prompt (y/N)
|
|
448
447
|
cdkd state rm MyStack --yes # skip confirmation
|
|
449
448
|
cdkd state rm StackA StackB --force # also bypass the locked-stack refusal
|
|
449
|
+
|
|
450
|
+
# Destroy a stack's AWS resources AND remove its state record, without
|
|
451
|
+
# requiring the CDK app (no synth — works from any working directory).
|
|
452
|
+
cdkd state destroy MyStack # per-stack confirmation prompt
|
|
453
|
+
cdkd state destroy MyStack OtherStack --yes
|
|
454
|
+
cdkd state destroy --all -y # every stack in the bucket
|
|
455
|
+
cdkd state destroy MyStack --region us-east-1
|
|
450
456
|
```
|
|
451
457
|
|
|
458
|
+
> `cdkd state destroy` vs `cdkd state rm`: `state destroy` deletes both the
|
|
459
|
+
> AWS resources and the state record (the equivalent of `cdkd destroy` minus
|
|
460
|
+
> the CDK-app dependency). `state rm` only forgets the state record and
|
|
461
|
+
> leaves the AWS resources intact.
|
|
462
|
+
|
|
452
463
|
### Concurrency Options
|
|
453
464
|
|
|
454
465
|
| Option | Default | Description |
|
|
@@ -547,7 +558,7 @@ s3://{state-bucket}/
|
|
|
547
558
|
|
|
548
559
|
| Setting | CLI | cdk.json | Env var | Default |
|
|
549
560
|
|---------|-----|----------|---------|---------|
|
|
550
|
-
| Bucket | `--state-bucket` | `context.cdkd.stateBucket` | `CDKD_STATE_BUCKET` | `cdkd-state-{accountId}-{region}` |
|
|
561
|
+
| Bucket | `--state-bucket` | `context.cdkd.stateBucket` | `CDKD_STATE_BUCKET` | `cdkd-state-{accountId}` (legacy `cdkd-state-{accountId}-{region}` is still read with a deprecation warning) |
|
|
551
562
|
| Prefix | `--state-prefix` | - | - | `cdkd` |
|
|
552
563
|
|
|
553
564
|
### Multi-app isolation
|