@go-to-k/cdkd 0.275.5 → 0.276.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/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as WorkGraph, A as slowCcOperationTimeoutMs, At as warnDeprecatedNoPrefixCliFlag, B as applyRoleArnIfSet, Bt as resolveBucketRegion, C as yellow, Ct as resolveAutoAssetStorage, D as ProviderRegistry, Dt as resolveStateBucketWithDefaultAndSource, E as clearOnUpdateRemoval, Et as resolveStateBucketWithDefault, F as refStateLookupFromResource, Ft as uploadCfnTemplate, G as DagBuilder, H as describeTypeWithThrottleRetry, Ht as getAwsClients, I as WAFv2WebACLProvider, It as expectedOwnerParam, J as S3StateBackend, K as TemplateParser, Kt as CdkdError, L as normalizeAwsTagsToCfn, Lt as AssemblyReader, M as isTerminationProtectionPropagationError, Mt as CFN_TEMPLATE_URL_LIMIT, N as IntrinsicFunctionResolver, Nt as MIGRATE_TMP_PREFIX, O as findActionableSilentDrops, Ot as resolveUseCdkBootstrapAssets, P as cfnRefValueFromPhysicalId, Pt as findLargeInlineResources, Q as stringifyValue, Qt as LocalStartServiceError, R as resolveExplicitPhysicalId, Rt as processStackMessages, S as red, St as resolveApp, T as collectInlinePolicyNamesManagedBySiblings, Tt as resolveSkipPrefix, U as withRetry, Ut as resetAwsClients, V as DiffCalculator, Vt as AwsClients, W as isRetryableTransientError, Wt as setAwsClients, X as shouldRetainResource, Xt as LocalInvokeBuildError$1, Y as rebuildClientForBucketRegion, Yt as DeployCancelledError, Z as AssetPublisher, Zt as LocalMigrateError, _ as formatResourceLine, _t as getDockerImageBySourceHash, a as DeploymentEventsStore, an as ResourceUpdateNotSupportedError, at as BOOTSTRAP_MARKER_PREFIX, b as gray, bt as getDefaultStateBucketName, c as replayFailedOperations, ct as parseBootstrapMarker, d as IMPLICIT_DELETE_DEPENDENCIES, dt as buildDockerImage, en as MissingCdkCliError, et as buildAssetRedirectMap, f as computeImplicitDeleteEdges, fn as normalizeAwsError, ft as formatDockerLoginError, g as renderStatefulReason, gt as AssetManifestLoader, h as isStatefulRecreateTargetSync, ht as runDockerStreaming, i as DeploymentEventsReader, in as ResourceTimeoutError, it as AssetModeResolver, j as disableInstanceApiTermination, jt as CFN_TEMPLATE_BODY_LIMIT, k as CloudControlProvider, kt as stateBucketExistenceConfirmed, l as replayRollback, lt as validateAssetBucketName, m as MULTI_REGION_RECREATE_BLOCKED_TYPES, mt as runDockerForeground, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as PartialFailureError, nt as loadPublishableAssetManifest, o as planFailedOps, on as StackHasActiveImportsError, ot as ensureAssetStorage, p as extractDeploymentEventError, pn as withErrorHandling, pt as getDockerCmd, q as LockManager, r as DeployEngine, rn as ProvisioningError, rt as rewriteTemplateAssetReferences, s as planRollback, sn as StackTerminationProtectionError, st as getBootstrapMarkerKey, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as NestedStackChildDirectDestroyError, tt as createAssetRedirectResolver, u as withResourceDeadline, ut as validateContainerRepoName, v as bold, vt as Synthesizer, w as IAMRoleProvider, wt as resolveCaptureObservedState, x as green, xt as getLegacyStateBucketName, y as cyan, yt as synthesisStatusMessage, z as assertRegionMatch } from "./deploy-engine-rn1TQits.js";
2
+ import { $ as TemplateParser, $t as CdkdError, A as yellow, At as resolveAutoAssetStorage, B as IntrinsicFunctionResolver, Bt as MIGRATE_TMP_PREFIX, C as renderStatefulReason, Ct as AssetManifestLoader, D as gray, Dt as getDefaultStateBucketName, E as cyan, Et as synthesisStatusMessage, F as findActionableSilentDrops, Ft as resolveUseCdkBootstrapAssets, G as resolveExplicitPhysicalId, Gt as processStackMessages, H as refStateLookupFromResource, Ht as uploadCfnTemplate, I as CloudControlProvider, It as stateBucketExistenceConfirmed, J as DiffCalculator, Jt as AwsClients, K as assertRegionMatch, L as slowCcOperationTimeoutMs, Lt as warnDeprecatedNoPrefixCliFlag, M as collectInlinePolicyNamesManagedBySiblings, Mt as resolveSkipPrefix, N as clearOnUpdateRemoval, Nt as resolveStateBucketWithDefault, O as green, Ot as getLegacyStateBucketName, P as ProviderRegistry, Pt as resolveStateBucketWithDefaultAndSource, Q as DagBuilder, R as disableInstanceApiTermination, Rt as CFN_TEMPLATE_BODY_LIMIT, S as isStatefulRecreateTargetSync, St as runDockerStreaming, T as bold, Tt as Synthesizer, U as WAFv2WebACLProvider, Ut as expectedOwnerParam, V as cfnRefValueFromPhysicalId, Vt as findLargeInlineResources, W as normalizeAwsTagsToCfn, Wt as AssemblyReader, X as withRetry, Xt as resetAwsClients, Y as describeTypeWithThrottleRetry, Yt as getAwsClients, Z as isRetryableTransientError, Zt as setAwsClients, _ as createPreDeleteFinalSnapshot, _t as validateContainerRepoName, a as DeploymentEventsStore, an as LocalStartServiceError, at as stringifyValue, b as extractDeploymentEventError, bn as withErrorHandling, bt as getDockerCmd, c as replayFailedOperations, cn as NestedStackChildDirectDestroyError, ct as createAssetRedirectResolver, d as IMPLICIT_DELETE_DEPENDENCIES, dn as ResourceTimeoutError, dt as AssetModeResolver, et as LockManager, f as computeImplicitDeleteEdges, fn as ResourceUpdateNotSupportedError, ft as BOOTSTRAP_MARKER_PREFIX, g as ccRoutedFinalSnapshotError, gt as validateAssetBucketName, h as buildFinalSnapshotIdentifier, ht as parseBootstrapMarker, i as DeploymentEventsReader, in as LocalMigrateError, it as AssetPublisher, j as IAMRoleProvider, jt as resolveCaptureObservedState, k as red, kt as resolveApp, l as replayRollback, ln as PartialFailureError, lt as loadPublishableAssetManifest, m as PRE_DELETE_SNAPSHOT_TYPES, mn as StackTerminationProtectionError, mt as getBootstrapMarkerKey, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as DeployCancelledError, nt as rebuildClientForBucketRegion, o as planFailedOps, ot as WorkGraph, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as StackHasActiveImportsError, pt as ensureAssetStorage, q as applyRoleArnIfSet, qt as resolveBucketRegion, r as DeployEngine, rn as LocalInvokeBuildError$1, rt as shouldRetainResource, s as planRollback, sn as MissingCdkCliError, st as buildAssetRedirectMap, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as S3StateBackend, u as withResourceDeadline, un as ProvisioningError, ut as rewriteTemplateAssetReferences, v as isFinalSnapshotError, vt as buildDockerImage, w as formatResourceLine, wt as getDockerImageBySourceHash, x as MULTI_REGION_RECREATE_BLOCKED_TYPES, xt as runDockerForeground, y as unsupportedFinalSnapshotError, yn as normalizeAwsError, yt as formatDockerLoginError, z as isTerminationProtectionPropagationError, zt as CFN_TEMPLATE_URL_LIMIT } from "./deploy-engine-j0TmnJYJ.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-D6Y0zhd3.js";
4
+ import { t as ASGProvider } from "./asg-provider-DeLTuWlm.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";
@@ -21,6 +21,7 @@ import { CloudFrontClient, CreateCloudFrontOriginAccessIdentityCommand, CreateDi
21
21
  import { CloudWatchClient, DeleteAlarmsCommand, DeleteAnomalyDetectorCommand, DescribeAlarmsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, PutAnomalyDetectorCommand, PutMetricAlarmCommand, ResourceNotFoundException as ResourceNotFoundException$4, TagResourceCommand as TagResourceCommand$7, UntagResourceCommand as UntagResourceCommand$7 } from "@aws-sdk/client-cloudwatch";
22
22
  import { AssociateKmsKeyCommand, CloudWatchLogsClient, CreateLogGroupCommand, DeleteDataProtectionPolicyCommand, DeleteIndexPolicyCommand, DeleteLogGroupCommand, DeleteRetentionPolicyCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, DisassociateKmsKeyCommand, GetDataProtectionPolicyCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$5, PutBearerTokenAuthenticationCommand, PutDataProtectionPolicyCommand, PutIndexPolicyCommand, PutLogGroupDeletionProtectionCommand, PutRetentionPolicyCommand, ResourceAlreadyExistsException, ResourceNotFoundException as ResourceNotFoundException$5, TagResourceCommand as TagResourceCommand$8, UntagResourceCommand as UntagResourceCommand$8 } from "@aws-sdk/client-cloudwatch-logs";
23
23
  import { BedrockAgentCoreControlClient, CreateAgentRuntimeCommand, CreateEvaluatorCommand, DeleteAgentRuntimeCommand, DeleteEvaluatorCommand, GetAgentRuntimeCommand, GetBrowserCommand, GetCodeInterpreterCommand, GetEvaluatorCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$6, ResourceNotFoundException as ResourceNotFoundException$6, TagResourceCommand as TagResourceCommand$9, UntagResourceCommand as UntagResourceCommand$9, UpdateAgentRuntimeCommand, UpdateEvaluatorCommand } from "@aws-sdk/client-bedrock-agentcore-control";
24
+ import { AddTagsToResourceCommand as AddTagsToResourceCommand$1, CreateCacheClusterCommand, CreateCacheSubnetGroupCommand, DeleteCacheClusterCommand, DeleteCacheSubnetGroupCommand, DescribeCacheClustersCommand, DescribeCacheSubnetGroupsCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$7, ModifyCacheClusterCommand, ModifyCacheSubnetGroupCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$1 } from "@aws-sdk/client-elasticache";
24
25
  import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$7, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
25
26
  import { CreateMicrovmImageCommand, DeleteMicrovmImageCommand, GetMicrovmImageCommand, LambdaMicrovmsClient, ListTagsCommand as ListTagsCommand$1, ResourceNotFoundException as ResourceNotFoundException$8, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$10, UpdateMicrovmImageCommand } from "@aws-sdk/client-lambda-microvms";
26
27
  import * as fs from "node:fs";
@@ -29,14 +30,13 @@ import * as path from "node:path";
29
30
  import { basename, dirname, isAbsolute, join, resolve } from "node:path";
30
31
  import { execFile, spawn } from "node:child_process";
31
32
  import { tmpdir } from "node:os";
32
- import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, ListHostedZonesByNameCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$7, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
33
+ import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, ListHostedZonesByNameCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$8, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
33
34
  import { AddTagsCommand, CreateListenerCommand, CreateLoadBalancerCommand, CreateTargetGroupCommand, DeleteListenerCommand, DeleteLoadBalancerCommand, DeleteTargetGroupCommand, DescribeListenerAttributesCommand, DescribeListenersCommand, DescribeLoadBalancerAttributesCommand, DescribeLoadBalancersCommand, DescribeTagsCommand, DescribeTargetGroupsCommand, ElasticLoadBalancingV2Client, ModifyListenerAttributesCommand, ModifyListenerCommand, ModifyLoadBalancerAttributesCommand, ModifyTargetGroupCommand, RemoveTagsCommand, SetIpAddressTypeCommand, SetSecurityGroupsCommand, SetSubnetsCommand, waitUntilLoadBalancerAvailable } from "@aws-sdk/client-elastic-load-balancing-v2";
34
35
  import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$11, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
35
36
  import { join as join$1 } from "path";
36
- import { BatchDeleteImageCommand, CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$8, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotEmptyException, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12 } from "@aws-sdk/client-ecr";
37
+ import { BatchDeleteImageCommand, CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$9, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotEmptyException, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12 } from "@aws-sdk/client-ecr";
37
38
  import graphlib from "graphlib";
38
- import { AddTagsToResourceCommand as AddTagsToResourceCommand$1, CreateDBClusterCommand, CreateDBInstanceCommand, CreateDBProxyCommand, CreateDBProxyEndpointCommand, CreateDBSubnetGroupCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBClusterCommand, DeleteDBInstanceCommand, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeleteDBSubnetGroupCommand, DeregisterDBProxyTargetsCommand, DescribeDBClustersCommand, DescribeDBInstancesCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, DescribeDBSubnetGroupsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$9, ModifyDBClusterCommand, ModifyDBInstanceCommand, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, ModifyDBSubnetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$1 } from "@aws-sdk/client-rds";
39
- import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateCacheClusterCommand, CreateCacheSubnetGroupCommand, DeleteCacheClusterCommand, DeleteCacheSubnetGroupCommand, DescribeCacheClustersCommand, DescribeCacheSubnetGroupsCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$10, ModifyCacheClusterCommand, ModifyCacheSubnetGroupCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-elasticache";
39
+ import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateDBClusterCommand, CreateDBInstanceCommand, CreateDBProxyCommand, CreateDBProxyEndpointCommand, CreateDBSubnetGroupCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBClusterCommand, DeleteDBInstanceCommand, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeleteDBSubnetGroupCommand, DeregisterDBProxyTargetsCommand, DescribeDBClustersCommand, DescribeDBInstancesCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, DescribeDBSubnetGroupsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$10, ModifyDBClusterCommand, ModifyDBInstanceCommand, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, ModifyDBSubnetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-rds";
40
40
  import { Command, Option } from "commander";
41
41
  import * as readline$1 from "node:readline/promises";
42
42
  import readline from "node:readline/promises";
@@ -707,6 +707,23 @@ const destroyOptions = [
707
707
  new Option("--remove-protection", "Bypass deletion protection on protected resources by flipping the per-resource protection flag off in-place before delete. Covers stack-level terminationProtection (CDK property) and resource-level protection on AWS::Logs::LogGroup, AWS::RDS::DBInstance, AWS::RDS::DBCluster, AWS::DocDB::DBCluster, AWS::Neptune::DBCluster, AWS::Neptune::DBInstance, AWS::DynamoDB::Table, AWS::EC2::Instance, AWS::Cognito::UserPool, AWS::AutoScaling::AutoScalingGroup, AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::DSQL::Cluster, AWS::NeptuneGraph::Graph, AWS::SMSVOICE::ProtectConfiguration, AWS::VerifiedPermissions::PolicyStore, AWS::EKS::Cluster, AWS::RDS::GlobalCluster, and AWS::DocDB::GlobalCluster.").default(false),
708
708
  allowUnsupportedTypesOption
709
709
  ];
710
+ /**
711
+ * `--skip-final-snapshot` (issues #1352 / #1353 / #1354) — the explicit
712
+ * data-loss opt-out for `DeletionPolicy: Snapshot` (and, on the replacement
713
+ * paths, `UpdateReplacePolicy: Snapshot`) resources. By default the delete
714
+ * paths honor the policy (CloudFormation parity): an atomic final-snapshot
715
+ * delete parameter for RDS DBInstance / DBCluster, Neptune / DocDB clusters
716
+ * and ElastiCache CacheCluster; a pre-delete snapshot+wait for
717
+ * `AWS::EC2::Volume`, `AWS::Redshift::Cluster` and
718
+ * `AWS::ElastiCache::ReplicationGroup`; and a refusal when cdkd cannot
719
+ * honor the policy (a Cloud-Control-routed atomic type — its delete has no
720
+ * final-snapshot parameter). Attached to `cdkd deploy` (template-removal +
721
+ * replacement deletes), `cdkd destroy`, and `cdkd state destroy` — NOT to
722
+ * the shared `destroyOptions` array, which `cdkd orphan` also consumes
723
+ * (orphan never deletes AWS resources, so the flag would be inert noise
724
+ * there).
725
+ */
726
+ const skipFinalSnapshotOption = new Option("--skip-final-snapshot", "Delete resources whose DeletionPolicy (or, on replacements, UpdateReplacePolicy) is 'Snapshot' WITHOUT creating the final snapshot the policy promises (DATA LOSS — explicit opt-out of CloudFormation parity). By default cdkd creates the final snapshot for every CloudFormation-supported type (RDS DBInstance / DBCluster, Neptune / DocDB clusters, ElastiCache CacheCluster / ReplicationGroup, Redshift Cluster, EC2 Volume) and refuses the delete when it cannot — e.g. a resource managed via the Cloud Control API route, whose delete has no final-snapshot parameter.").default(false);
710
727
 
711
728
  //#endregion
712
729
  //#region src/cli/commands/state-file-keys.ts
@@ -25232,10 +25249,10 @@ var RDSProvider = class {
25232
25249
  "EnableIAMDatabaseAuthentication"
25233
25250
  ])]
25234
25251
  ]);
25235
- unhandledByDesign = /* @__PURE__ */ new Map([["AWS::RDS::DBCluster", /* @__PURE__ */ new Map([["DeleteAutomatedBackups", "cdkd hardcodes SkipFinalSnapshot=true on destroy; this CFn lifecycle flag has no equivalent on the runtime path"]])], ["AWS::RDS::DBInstance", /* @__PURE__ */ new Map([
25252
+ unhandledByDesign = /* @__PURE__ */ new Map([["AWS::RDS::DBCluster", /* @__PURE__ */ new Map([["DeleteAutomatedBackups", "delete-time lifecycle flag not threaded through cdkd destroy; final snapshots are governed by DeletionPolicy: Snapshot (issue #1352), which this flag does not control"]])], ["AWS::RDS::DBInstance", /* @__PURE__ */ new Map([
25236
25253
  ["DBSecurityGroups", "EC2-Classic-only feature retired by AWS (2022-08-15); new accounts cannot use this — use VPCSecurityGroups instead"],
25237
25254
  ["ApplyImmediately", "cdkd always applies modifications immediately (rds:ModifyDBInstance.ApplyImmediately=true is hardcoded); users wanting maintenance-window deferral should run aws rds modify-db-instance directly"],
25238
- ["DeleteAutomatedBackups", "cdkd hardcodes SkipFinalSnapshot=true on destroy; this CFn lifecycle flag has no equivalent on the runtime path"]
25255
+ ["DeleteAutomatedBackups", "delete-time lifecycle flag not threaded through cdkd destroy; final snapshots are governed by DeletionPolicy: Snapshot (issue #1352), which this flag does not control"]
25239
25256
  ])]]);
25240
25257
  getClient() {
25241
25258
  if (!this.rdsClient) this.rdsClient = new RDSClient(this.providerRegion ? { region: this.providerRegion } : {});
@@ -25257,11 +25274,11 @@ var RDSProvider = class {
25257
25274
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
25258
25275
  }
25259
25276
  }
25260
- async delete(logicalId, physicalId, resourceType, _properties, context) {
25277
+ async delete(logicalId, physicalId, resourceType, properties, context) {
25261
25278
  switch (resourceType) {
25262
25279
  case "AWS::RDS::DBSubnetGroup": return this.deleteDBSubnetGroup(logicalId, physicalId, resourceType, context);
25263
25280
  case "AWS::RDS::DBCluster": return this.deleteDBCluster(logicalId, physicalId, resourceType, context);
25264
- case "AWS::RDS::DBInstance": return this.deleteDBInstance(logicalId, physicalId, resourceType, context);
25281
+ case "AWS::RDS::DBInstance": return this.deleteDBInstance(logicalId, physicalId, resourceType, properties, context);
25265
25282
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
25266
25283
  }
25267
25284
  }
@@ -25465,10 +25482,15 @@ var RDSProvider = class {
25465
25482
  } catch (disableError) {
25466
25483
  if (!this.isNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(`Could not disable deletion protection for ${physicalId}: ${disableError instanceof Error ? disableError.message : String(disableError)}`);
25467
25484
  }
25485
+ const finalSnapshotId = context?.finalSnapshotIdentifier;
25468
25486
  await this.getClient().send(new DeleteDBClusterCommand({
25469
25487
  DBClusterIdentifier: physicalId,
25470
- SkipFinalSnapshot: true
25488
+ ...finalSnapshotId ? {
25489
+ SkipFinalSnapshot: false,
25490
+ FinalDBSnapshotIdentifier: finalSnapshotId
25491
+ } : { SkipFinalSnapshot: true }
25471
25492
  }));
25493
+ if (finalSnapshotId) this.logger.info(`Deleting DBCluster ${logicalId} with final snapshot ${finalSnapshotId} (DeletionPolicy: Snapshot)`);
25472
25494
  this.logger.debug(`Successfully initiated deletion of DBCluster ${logicalId}`);
25473
25495
  await this.waitForClusterDeleted(physicalId);
25474
25496
  } catch (error) {
@@ -25574,7 +25596,7 @@ var RDSProvider = class {
25574
25596
  throw new ProvisioningError(`Failed to update DBInstance ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
25575
25597
  }
25576
25598
  }
25577
- async deleteDBInstance(logicalId, physicalId, resourceType, context) {
25599
+ async deleteDBInstance(logicalId, physicalId, resourceType, properties, context) {
25578
25600
  this.logger.debug(`Deleting DBInstance ${logicalId}: ${physicalId}`);
25579
25601
  try {
25580
25602
  if (context?.removeProtection === true) try {
@@ -25587,10 +25609,15 @@ var RDSProvider = class {
25587
25609
  } catch (disableError) {
25588
25610
  if (!this.isNotFoundError(disableError, "DBInstanceNotFoundFault")) this.logger.debug(`Could not disable deletion protection for ${physicalId}: ${disableError instanceof Error ? disableError.message : String(disableError)}`);
25589
25611
  }
25612
+ const finalSnapshotId = properties?.["DBClusterIdentifier"] === void 0 ? context?.finalSnapshotIdentifier : void 0;
25590
25613
  await this.getClient().send(new DeleteDBInstanceCommand({
25591
25614
  DBInstanceIdentifier: physicalId,
25592
- SkipFinalSnapshot: true
25615
+ ...finalSnapshotId ? {
25616
+ SkipFinalSnapshot: false,
25617
+ FinalDBSnapshotIdentifier: finalSnapshotId
25618
+ } : { SkipFinalSnapshot: true }
25593
25619
  }));
25620
+ if (finalSnapshotId) this.logger.info(`Deleting DBInstance ${logicalId} with final snapshot ${finalSnapshotId} (DeletionPolicy: Snapshot)`);
25594
25621
  this.logger.debug(`Successfully initiated deletion of DBInstance ${logicalId}`);
25595
25622
  await this.waitForInstanceDeleted(physicalId);
25596
25623
  } catch (error) {
@@ -25624,14 +25651,14 @@ var RDSProvider = class {
25624
25651
  const tagsToRemove = [];
25625
25652
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
25626
25653
  if (tagsToRemove.length > 0) {
25627
- await this.getClient().send(new RemoveTagsFromResourceCommand$1({
25654
+ await this.getClient().send(new RemoveTagsFromResourceCommand$2({
25628
25655
  ResourceName: arn,
25629
25656
  TagKeys: tagsToRemove
25630
25657
  }));
25631
25658
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from RDS resource ${arn}`);
25632
25659
  }
25633
25660
  if (tagsToAdd.length > 0) {
25634
- await this.getClient().send(new AddTagsToResourceCommand$1({
25661
+ await this.getClient().send(new AddTagsToResourceCommand$2({
25635
25662
  ResourceName: arn,
25636
25663
  Tags: tagsToAdd
25637
25664
  }));
@@ -25866,7 +25893,7 @@ var RDSProvider = class {
25866
25893
  */
25867
25894
  async attachTags(result, arn) {
25868
25895
  try {
25869
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: arn }))).TagList);
25896
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$10({ ResourceName: arn }))).TagList);
25870
25897
  } catch (err) {
25871
25898
  this.logger.debug(`RDS ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
25872
25899
  }
@@ -26161,7 +26188,7 @@ var RDSDBProxyProvider = class {
26161
26188
  }))
26162
26189
  };
26163
26190
  if (p.DBProxyArn) try {
26164
- result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$9({ ResourceName: p.DBProxyArn }))).TagList ?? []);
26191
+ result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$10({ ResourceName: p.DBProxyArn }))).TagList ?? []);
26165
26192
  } catch (error) {
26166
26193
  this.logger.debug(`ListTagsForResource failed for ${physicalId}: ${error instanceof Error ? error.message : String(error)}`);
26167
26194
  result["Tags"] = [];
@@ -26192,7 +26219,7 @@ var RDSDBProxyProvider = class {
26192
26219
  Value: v
26193
26220
  });
26194
26221
  if (toRemove.length > 0) try {
26195
- await client.send(new RemoveTagsFromResourceCommand$1({
26222
+ await client.send(new RemoveTagsFromResourceCommand$2({
26196
26223
  ResourceName: arn,
26197
26224
  TagKeys: toRemove
26198
26225
  }));
@@ -26200,7 +26227,7 @@ var RDSDBProxyProvider = class {
26200
26227
  throw this.wrapError(error, "UPDATE (remove tags)", resourceType, logicalId, physicalId);
26201
26228
  }
26202
26229
  if (toAdd.length > 0) try {
26203
- await client.send(new AddTagsToResourceCommand$1({
26230
+ await client.send(new AddTagsToResourceCommand$2({
26204
26231
  ResourceName: arn,
26205
26232
  Tags: toAdd
26206
26233
  }));
@@ -26467,7 +26494,7 @@ var RDSDBProxyEndpointProvider = class {
26467
26494
  TargetRole: e.TargetRole ?? "READ_WRITE"
26468
26495
  };
26469
26496
  if (e.DBProxyEndpointArn) try {
26470
- result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$9({ ResourceName: e.DBProxyEndpointArn }))).TagList ?? []);
26497
+ result["Tags"] = normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$10({ ResourceName: e.DBProxyEndpointArn }))).TagList ?? []);
26471
26498
  } catch (error) {
26472
26499
  this.logger.debug(`ListTagsForResource failed for ${physicalId}: ${error instanceof Error ? error.message : String(error)}`);
26473
26500
  result["Tags"] = [];
@@ -26498,7 +26525,7 @@ var RDSDBProxyEndpointProvider = class {
26498
26525
  Value: v
26499
26526
  });
26500
26527
  if (toRemove.length > 0) try {
26501
- await client.send(new RemoveTagsFromResourceCommand$1({
26528
+ await client.send(new RemoveTagsFromResourceCommand$2({
26502
26529
  ResourceName: arn,
26503
26530
  TagKeys: toRemove
26504
26531
  }));
@@ -26506,7 +26533,7 @@ var RDSDBProxyEndpointProvider = class {
26506
26533
  throw this.wrapError(error, "UPDATE (remove tags)", resourceType, logicalId, physicalId);
26507
26534
  }
26508
26535
  if (toAdd.length > 0) try {
26509
- await client.send(new AddTagsToResourceCommand$1({
26536
+ await client.send(new AddTagsToResourceCommand$2({
26510
26537
  ResourceName: arn,
26511
26538
  Tags: toAdd
26512
26539
  }));
@@ -27106,10 +27133,15 @@ var DocDBProvider = class {
27106
27133
  } catch (disableError) {
27107
27134
  if (!this.isNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(`Could not disable deletion protection for ${physicalId}: ${disableError instanceof Error ? disableError.message : String(disableError)}`);
27108
27135
  }
27136
+ const finalSnapshotId = context?.finalSnapshotIdentifier;
27109
27137
  await this.getClient().send(new DeleteDBClusterCommand$1({
27110
27138
  DBClusterIdentifier: physicalId,
27111
- SkipFinalSnapshot: true
27139
+ ...finalSnapshotId ? {
27140
+ SkipFinalSnapshot: false,
27141
+ FinalDBSnapshotIdentifier: finalSnapshotId
27142
+ } : { SkipFinalSnapshot: true }
27112
27143
  }));
27144
+ if (finalSnapshotId) this.logger.info(`Deleting DocDB DBCluster ${logicalId} with final snapshot ${finalSnapshotId} (DeletionPolicy: Snapshot)`);
27113
27145
  this.logger.debug(`Successfully initiated deletion of DocDB DBCluster ${logicalId}`);
27114
27146
  await this.waitForClusterDeleted(physicalId);
27115
27147
  } catch (error) {
@@ -27731,10 +27763,15 @@ var NeptuneProvider = class {
27731
27763
  } catch (disableError) {
27732
27764
  if (!this.isNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(`Could not disable deletion protection for ${physicalId}: ${disableError instanceof Error ? disableError.message : String(disableError)}`);
27733
27765
  }
27766
+ const finalSnapshotId = context?.finalSnapshotIdentifier;
27734
27767
  await this.getClient().send(new DeleteDBClusterCommand$2({
27735
27768
  DBClusterIdentifier: physicalId,
27736
- SkipFinalSnapshot: true
27769
+ ...finalSnapshotId ? {
27770
+ SkipFinalSnapshot: false,
27771
+ FinalDBSnapshotIdentifier: finalSnapshotId
27772
+ } : { SkipFinalSnapshot: true }
27737
27773
  }));
27774
+ if (finalSnapshotId) this.logger.info(`Deleting Neptune DBCluster ${logicalId} with final snapshot ${finalSnapshotId} (DeletionPolicy: Snapshot)`);
27738
27775
  this.logger.debug(`Successfully initiated deletion of Neptune DBCluster ${logicalId}`);
27739
27776
  await this.waitForClusterDeleted(physicalId);
27740
27777
  } catch (error) {
@@ -28728,7 +28765,7 @@ var Route53Provider = class {
28728
28765
  });
28729
28766
  const idTail = physicalId.replace(/^\/hostedzone\//, "");
28730
28767
  try {
28731
- result["HostedZoneTags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$7({
28768
+ result["HostedZoneTags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$8({
28732
28769
  ResourceType: "hostedzone",
28733
28770
  ResourceId: idTail
28734
28771
  }))).ResourceTagSet?.Tags);
@@ -29646,7 +29683,12 @@ var ElastiCacheProvider = class {
29646
29683
  async deleteCacheCluster(logicalId, physicalId, resourceType, context) {
29647
29684
  this.logger.debug(`Deleting CacheCluster ${logicalId}: ${physicalId}`);
29648
29685
  try {
29649
- await this.getClient().send(new DeleteCacheClusterCommand({ CacheClusterId: physicalId }));
29686
+ const finalSnapshotId = context?.finalSnapshotIdentifier;
29687
+ await this.getClient().send(new DeleteCacheClusterCommand({
29688
+ CacheClusterId: physicalId,
29689
+ ...finalSnapshotId ? { FinalSnapshotIdentifier: finalSnapshotId } : {}
29690
+ }));
29691
+ if (finalSnapshotId) this.logger.info(`Deleting CacheCluster ${logicalId} with final snapshot ${finalSnapshotId} (DeletionPolicy: Snapshot)`);
29650
29692
  this.logger.debug(`Successfully initiated deletion of CacheCluster ${logicalId}`);
29651
29693
  await this.waitForClusterDeleted(physicalId);
29652
29694
  } catch (error) {
@@ -29704,14 +29746,14 @@ var ElastiCacheProvider = class {
29704
29746
  const tagsToRemove = [];
29705
29747
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
29706
29748
  if (tagsToRemove.length > 0) {
29707
- await this.getClient().send(new RemoveTagsFromResourceCommand$2({
29749
+ await this.getClient().send(new RemoveTagsFromResourceCommand$1({
29708
29750
  ResourceName: arn,
29709
29751
  TagKeys: tagsToRemove
29710
29752
  }));
29711
29753
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from ElastiCache resource ${arn}`);
29712
29754
  }
29713
29755
  if (tagsToAdd.length > 0) {
29714
- await this.getClient().send(new AddTagsToResourceCommand$2({
29756
+ await this.getClient().send(new AddTagsToResourceCommand$1({
29715
29757
  ResourceName: arn,
29716
29758
  Tags: tagsToAdd
29717
29759
  }));
@@ -29858,7 +29900,7 @@ var ElastiCacheProvider = class {
29858
29900
  /** Best-effort tag fetch — failures omit the key without breaking the read. */
29859
29901
  async attachTags(result, arn) {
29860
29902
  try {
29861
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$10({ ResourceName: arn }))).TagList);
29903
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$7({ ResourceName: arn }))).TagList);
29862
29904
  } catch (err) {
29863
29905
  this.logger.debug(`ElastiCache ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
29864
29906
  }
@@ -42415,7 +42457,7 @@ var ECRProvider = class {
42415
42457
  if (!(err instanceof LifecyclePolicyNotFoundException)) throw err;
42416
42458
  }
42417
42459
  if (r.repositoryArn) try {
42418
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$8({ resourceArn: r.repositoryArn }))).tags);
42460
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$9({ resourceArn: r.repositoryArn }))).tags);
42419
42461
  } catch (err) {
42420
42462
  if (!(err instanceof RepositoryNotFoundException)) throw err;
42421
42463
  }
@@ -42784,6 +42826,11 @@ async function runDestroyForStack(stackName, state, ctx) {
42784
42826
  ...resource.provisionedBy && { provisionedBy: resource.provisionedBy }
42785
42827
  });
42786
42828
  try {
42829
+ let finalSnapshotIdentifier;
42830
+ if (resource.deletionPolicy === "Snapshot" && ctx.skipFinalSnapshot !== true) if (ATOMIC_FINAL_SNAPSHOT_TYPES.has(resource.resourceType) && resource.provisionedBy !== "cc-api") finalSnapshotIdentifier = buildFinalSnapshotIdentifier(resource.physicalId, resource.resourceType);
42831
+ else if (ATOMIC_FINAL_SNAPSHOT_TYPES.has(resource.resourceType)) throw ccRoutedFinalSnapshotError(logicalId, resource.resourceType, "--skip-final-snapshot");
42832
+ else if (PRE_DELETE_SNAPSHOT_TYPES.has(resource.resourceType)) await createPreDeleteFinalSnapshot(resource.resourceType, resource.physicalId, logicalId, destroyAwsClients ?? ctx.baseAwsClients, logger);
42833
+ else throw unsupportedFinalSnapshotError(logicalId, resource.resourceType, "--skip-final-snapshot");
42787
42834
  const provider = destroyProviderRegistry.getProviderFor({
42788
42835
  resourceType: resource.resourceType,
42789
42836
  provisionedBy: resource.provisionedBy
@@ -42799,7 +42846,8 @@ async function runDestroyForStack(stackName, state, ctx) {
42799
42846
  for (let attempt = 0; attempt <= maxAttempts; attempt++) try {
42800
42847
  await provider.delete(logicalId, resource.physicalId, resource.resourceType, resource.properties, {
42801
42848
  ...state.region !== void 0 && { expectedRegion: state.region },
42802
- ...ctx.removeProtection === true && { removeProtection: true }
42849
+ ...ctx.removeProtection === true && { removeProtection: true },
42850
+ ...finalSnapshotIdentifier !== void 0 && { finalSnapshotIdentifier }
42803
42851
  });
42804
42852
  lastDeleteError = null;
42805
42853
  break;
@@ -42842,7 +42890,7 @@ async function runDestroyForStack(stackName, state, ctx) {
42842
42890
  } catch (error) {
42843
42891
  renderer.removeTask(logicalId);
42844
42892
  const msg = error instanceof Error ? error.message : String(error);
42845
- if (msg.includes("does not exist") || msg.includes("not found") || msg.includes("No policy found") || msg.includes("NoSuchEntity") || msg.includes("NotFoundException")) {
42893
+ if (!isFinalSnapshotError(error) && (msg.includes("does not exist") || msg.includes("not found") || msg.includes("No policy found") || msg.includes("NoSuchEntity") || msg.includes("NotFoundException"))) {
42846
42894
  logger.debug(` ${logicalId} already deleted, removing from state`);
42847
42895
  result.deletedCount++;
42848
42896
  ctx.eventRecorder?.record({
@@ -43145,6 +43193,7 @@ var NestedStackProvider = class {
43145
43193
  ...ctx.exportIndexStore && { exportIndexStore: ctx.exportIndexStore },
43146
43194
  ...ctx.destroyOptions?.profile && { profile: ctx.destroyOptions.profile },
43147
43195
  ...deleteContext?.removeProtection === true && { removeProtection: true },
43196
+ ...(ctx.destroyOptions?.skipFinalSnapshot === true || ctx.options?.skipFinalSnapshot === true) && { skipFinalSnapshot: true },
43148
43197
  ...ctx.destroyOptions?.resourceWarnAfterMs !== void 0 && { resourceWarnAfterMs: ctx.destroyOptions.resourceWarnAfterMs },
43149
43198
  ...ctx.destroyOptions?.resourceTimeoutMs !== void 0 && { resourceTimeoutMs: ctx.destroyOptions.resourceTimeoutMs },
43150
43199
  ...ctx.destroyOptions?.resourceWarnAfterByType && { resourceWarnAfterByType: ctx.destroyOptions.resourceWarnAfterByType },
@@ -44258,6 +44307,8 @@ async function deployCommand(stacks, options) {
44258
44307
  ...recreateViaSdkProviderTargets && recreateViaSdkProviderTargets.size > 0 && { recreateViaSdkProviderTargets },
44259
44308
  ...options.replace && { replace: true },
44260
44309
  ...options.forceStatefulRecreation && { forceStatefulRecreation: true },
44310
+ ...options.skipFinalSnapshot && { skipFinalSnapshot: true },
44311
+ finalSnapshotClients: stackAwsClients,
44261
44312
  ...options.strictGetatt && { strictGetAtt: true },
44262
44313
  captureObservedState: resolveCaptureObservedState(options.captureObservedState),
44263
44314
  ...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
@@ -44348,6 +44399,7 @@ function createDeployCommand() {
44348
44399
  ...stateOptions,
44349
44400
  ...stackOptions,
44350
44401
  ...deployOptions,
44402
+ skipFinalSnapshotOption,
44351
44403
  ...contextOptions,
44352
44404
  ...annotationMessageOptions
44353
44405
  ].forEach((opt) => cmd.addOption(opt));
@@ -47133,6 +47185,7 @@ async function destroyCommand(stackArgs, options) {
47133
47185
  destroyOptions: {
47134
47186
  ...options.profile && { profile: options.profile },
47135
47187
  ...options.removeProtection === true && { removeProtection: true },
47188
+ ...options.skipFinalSnapshot === true && { skipFinalSnapshot: true },
47136
47189
  ...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
47137
47190
  ...options.resourceTimeout?.globalMs !== void 0 && { resourceTimeoutMs: options.resourceTimeout.globalMs },
47138
47191
  ...options.resourceWarnAfter?.perTypeMs && { resourceWarnAfterByType: options.resourceWarnAfter.perTypeMs },
@@ -47148,6 +47201,7 @@ async function destroyCommand(stackArgs, options) {
47148
47201
  stateBucket,
47149
47202
  skipConfirmation: options.yes || options.force,
47150
47203
  removeProtection: options.removeProtection === true,
47204
+ skipFinalSnapshot: options.skipFinalSnapshot === true,
47151
47205
  exportIndexStore,
47152
47206
  ...options.allowUnsupportedTypes?.length && { allowUnsupportedTypes: options.allowUnsupportedTypes },
47153
47207
  ...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
@@ -47203,6 +47257,7 @@ function createDestroyCommand() {
47203
47257
  ...stackOptions,
47204
47258
  ...destroyOptions,
47205
47259
  ...resourceTimeoutOptions,
47260
+ skipFinalSnapshotOption,
47206
47261
  ...contextOptions
47207
47262
  ].forEach((opt) => cmd.addOption(opt));
47208
47263
  cmd.addOption(deprecatedRegionOption);
@@ -50615,6 +50670,7 @@ async function stateDestroyCommand(stackArgs, options) {
50615
50670
  destroyOptions: {
50616
50671
  ...options.profile && { profile: options.profile },
50617
50672
  ...options.removeProtection === true && { removeProtection: true },
50673
+ ...options.skipFinalSnapshot === true && { skipFinalSnapshot: true },
50618
50674
  ...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
50619
50675
  ...options.resourceTimeout?.globalMs !== void 0 && { resourceTimeoutMs: options.resourceTimeout.globalMs },
50620
50676
  ...options.resourceWarnAfter?.perTypeMs && { resourceWarnAfterByType: options.resourceWarnAfter.perTypeMs },
@@ -50630,6 +50686,7 @@ async function stateDestroyCommand(stackArgs, options) {
50630
50686
  stateBucket: setup.bucket,
50631
50687
  skipConfirmation: options.yes || options.all === true,
50632
50688
  removeProtection: options.removeProtection === true,
50689
+ skipFinalSnapshot: options.skipFinalSnapshot === true,
50633
50690
  exportIndexStore: setup.exportIndexStore,
50634
50691
  ...options.allowUnsupportedTypes?.length && { allowUnsupportedTypes: options.allowUnsupportedTypes },
50635
50692
  ...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
@@ -50669,7 +50726,8 @@ function createStateDestroyCommand() {
50669
50726
  ...commonOptions,
50670
50727
  ...stateOptions,
50671
50728
  ...resourceTimeoutOptions,
50672
- allowUnsupportedTypesOption
50729
+ allowUnsupportedTypesOption,
50730
+ skipFinalSnapshotOption
50673
50731
  ].forEach((opt) => cmd.addOption(opt));
50674
50732
  cmd.addOption(deprecatedRegionOption);
50675
50733
  return cmd;
@@ -63649,7 +63707,7 @@ function createMigrateCommand() {
63649
63707
  */
63650
63708
  function buildProgram() {
63651
63709
  const program = new Command();
63652
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.275.5");
63710
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.276.0");
63653
63711
  program.hook("preAction", (_thisCommand, actionCommand) => {
63654
63712
  const { profile } = actionCommand.optsWithGlobals();
63655
63713
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;