@go-to-k/cdkd 0.267.16 → 0.267.18
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 +93 -105
- package/dist/{asg-provider-Ge0MCN5U.js → asg-provider-C6uxCStq.js} +2 -2
- package/dist/{asg-provider-Ge0MCN5U.js.map → asg-provider-C6uxCStq.js.map} +1 -1
- package/dist/cli.js +219 -26
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BjGr3po1.js → deploy-engine-D_KHeGjJ.js} +3 -3
- package/dist/{deploy-engine-BjGr3po1.js.map → deploy-engine-D_KHeGjJ.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as WorkGraph, $t as NestedStackChildDirectDestroyError, A as slowCcOperationTimeoutMs, At as CFN_TEMPLATE_BODY_LIMIT, B as applyRoleArnIfSet, Bt as AwsClients, C as yellow, Ct as resolveAutoAssetStorage, D as ProviderRegistry, Dt as resolveStateBucketWithDefaultAndSource, E as clearOnUpdateRemoval, Et as resolveStateBucketWithDefault, F as refStateLookupFromResource, Ft as expectedOwnerParam, G as DagBuilder, Gt as CdkdError, H as describeTypeWithThrottleRetry, Ht as resetAwsClients, I as WAFv2WebACLProvider, It as AssemblyReader, J as S3StateBackend, Jt as LocalInvokeBuildError$1, K as TemplateParser, L as normalizeAwsTagsToCfn, Lt as processStackMessages, M as isTerminationProtectionPropagationError, Mt as MIGRATE_TMP_PREFIX, N as IntrinsicFunctionResolver, Nt as findLargeInlineResources, O as findActionableSilentDrops, Ot as resolveUseCdkBootstrapAssets, P as cfnRefValueFromPhysicalId, Pt as uploadCfnTemplate, Q as stringifyValue, Qt as MissingCdkCliError, R as resolveExplicitPhysicalId, S as red, St as resolveApp, T as collectInlinePolicyNamesManagedBySiblings, Tt as resolveSkipPrefix, U as withRetry, Ut as setAwsClients, V as DiffCalculator, Vt as getAwsClients, W as isRetryableTransientError, X as shouldRetainResource, Xt as LocalStartServiceError, Y as rebuildClientForBucketRegion, Yt as LocalMigrateError, Z as AssetPublisher, _ as formatResourceLine, _t as getDockerImageBySourceHash, a as DeploymentEventsStore, an as StackTerminationProtectionError, at as BOOTSTRAP_MARKER_PREFIX, b as gray, bt as getDefaultStateBucketName, c as replayFailedOperations, ct as parseBootstrapMarker, d as IMPLICIT_DELETE_DEPENDENCIES, dn as withErrorHandling, dt as buildDockerImage, en as PartialFailureError, et as buildAssetRedirectMap, f as computeImplicitDeleteEdges, ft as formatDockerLoginError, g as renderStatefulReason, gt as AssetManifestLoader, h as isStatefulRecreateTargetSync, ht as runDockerStreaming, i as DeploymentEventsReader, in as StackHasActiveImportsError, it as AssetModeResolver, j as disableInstanceApiTermination, jt as CFN_TEMPLATE_URL_LIMIT, k as CloudControlProvider, kt as warnDeprecatedNoPrefixCliFlag, 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 ResourceTimeoutError, nt as loadPublishableAssetManifest, o as planFailedOps, ot as ensureAssetStorage, p as extractDeploymentEventError, pt as getDockerCmd, q as LockManager, r as DeployEngine, rn as ResourceUpdateNotSupportedError, rt as rewriteTemplateAssetReferences, s as planRollback, st as getBootstrapMarkerKey, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as ProvisioningError, tt as createAssetRedirectResolver, u as withResourceDeadline, un as normalizeAwsError, 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, zt as resolveBucketRegion } from "./deploy-engine-
|
|
2
|
+
import { $ as WorkGraph, $t as NestedStackChildDirectDestroyError, A as slowCcOperationTimeoutMs, At as CFN_TEMPLATE_BODY_LIMIT, B as applyRoleArnIfSet, Bt as AwsClients, C as yellow, Ct as resolveAutoAssetStorage, D as ProviderRegistry, Dt as resolveStateBucketWithDefaultAndSource, E as clearOnUpdateRemoval, Et as resolveStateBucketWithDefault, F as refStateLookupFromResource, Ft as expectedOwnerParam, G as DagBuilder, Gt as CdkdError, H as describeTypeWithThrottleRetry, Ht as resetAwsClients, I as WAFv2WebACLProvider, It as AssemblyReader, J as S3StateBackend, Jt as LocalInvokeBuildError$1, K as TemplateParser, L as normalizeAwsTagsToCfn, Lt as processStackMessages, M as isTerminationProtectionPropagationError, Mt as MIGRATE_TMP_PREFIX, N as IntrinsicFunctionResolver, Nt as findLargeInlineResources, O as findActionableSilentDrops, Ot as resolveUseCdkBootstrapAssets, P as cfnRefValueFromPhysicalId, Pt as uploadCfnTemplate, Q as stringifyValue, Qt as MissingCdkCliError, R as resolveExplicitPhysicalId, S as red, St as resolveApp, T as collectInlinePolicyNamesManagedBySiblings, Tt as resolveSkipPrefix, U as withRetry, Ut as setAwsClients, V as DiffCalculator, Vt as getAwsClients, W as isRetryableTransientError, X as shouldRetainResource, Xt as LocalStartServiceError, Y as rebuildClientForBucketRegion, Yt as LocalMigrateError, Z as AssetPublisher, _ as formatResourceLine, _t as getDockerImageBySourceHash, a as DeploymentEventsStore, an as StackTerminationProtectionError, at as BOOTSTRAP_MARKER_PREFIX, b as gray, bt as getDefaultStateBucketName, c as replayFailedOperations, ct as parseBootstrapMarker, d as IMPLICIT_DELETE_DEPENDENCIES, dn as withErrorHandling, dt as buildDockerImage, en as PartialFailureError, et as buildAssetRedirectMap, f as computeImplicitDeleteEdges, ft as formatDockerLoginError, g as renderStatefulReason, gt as AssetManifestLoader, h as isStatefulRecreateTargetSync, ht as runDockerStreaming, i as DeploymentEventsReader, in as StackHasActiveImportsError, it as AssetModeResolver, j as disableInstanceApiTermination, jt as CFN_TEMPLATE_URL_LIMIT, k as CloudControlProvider, kt as warnDeprecatedNoPrefixCliFlag, 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 ResourceTimeoutError, nt as loadPublishableAssetManifest, o as planFailedOps, ot as ensureAssetStorage, p as extractDeploymentEventError, pt as getDockerCmd, q as LockManager, r as DeployEngine, rn as ResourceUpdateNotSupportedError, rt as rewriteTemplateAssetReferences, s as planRollback, st as getBootstrapMarkerKey, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as ProvisioningError, tt as createAssetRedirectResolver, u as withResourceDeadline, un as normalizeAwsError, 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, zt as resolveBucketRegion } from "./deploy-engine-D_KHeGjJ.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-C6uxCStq.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";
|
|
@@ -30,7 +30,7 @@ import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
|
30
30
|
import { execFile, spawn } from "node:child_process";
|
|
31
31
|
import { tmpdir } from "node:os";
|
|
32
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 { AddTagsCommand, CreateListenerCommand, CreateLoadBalancerCommand, CreateTargetGroupCommand, DeleteListenerCommand, DeleteLoadBalancerCommand, DeleteTargetGroupCommand, DescribeListenerAttributesCommand, DescribeListenersCommand, DescribeLoadBalancerAttributesCommand, DescribeLoadBalancersCommand, DescribeTagsCommand, DescribeTargetGroupsCommand, ElasticLoadBalancingV2Client, ModifyListenerAttributesCommand, ModifyListenerCommand, ModifyLoadBalancerAttributesCommand, ModifyTargetGroupCommand, RemoveTagsCommand, SetIpAddressTypeCommand, SetSecurityGroupsCommand, SetSubnetsCommand } from "@aws-sdk/client-elastic-load-balancing-v2";
|
|
33
|
+
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
34
|
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
35
|
import { join as join$1 } from "path";
|
|
36
36
|
import { BatchDeleteImageCommand, CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$8, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12 } from "@aws-sdk/client-ecr";
|
|
@@ -45,7 +45,7 @@ import * as zlib from "node:zlib";
|
|
|
45
45
|
import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
|
|
46
46
|
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetIntegrationCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
47
47
|
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
48
|
-
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand } from "@aws-sdk/client-ecs";
|
|
48
|
+
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
|
|
49
49
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$12, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
|
|
50
50
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$4, CreateDBClusterCommand as CreateDBClusterCommand$2, CreateDBInstanceCommand as CreateDBInstanceCommand$2, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$2, DeleteDBClusterCommand as DeleteDBClusterCommand$2, DeleteDBInstanceCommand as DeleteDBInstanceCommand$2, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$2, DescribeDBClustersCommand as DescribeDBClustersCommand$2, DescribeDBInstancesCommand as DescribeDBInstancesCommand$2, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$2, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ModifyDBClusterCommand as ModifyDBClusterCommand$2, ModifyDBInstanceCommand as ModifyDBInstanceCommand$2, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$2, NeptuneClient, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$4 } from "@aws-sdk/client-neptune";
|
|
51
51
|
import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$8, SetUserPoolMfaConfigCommand, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
|
|
@@ -348,7 +348,8 @@ function ensureWarnAfter(opts) {
|
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* Skip waiting for async-stabilization resources (CloudFront, RDS,
|
|
351
|
-
* ElastiCache, NAT Gateway,
|
|
351
|
+
* ElastiCache, NAT Gateway, EC2 Instance, ELBv2 LoadBalancer, Lambda
|
|
352
|
+
* MicroVM Image) on deploy. Setting the flag mutates
|
|
352
353
|
* `process.env.CDKD_NO_WAIT='true'`; provider code checks that env
|
|
353
354
|
* var, not the parsed CLI option (this lets nested call paths — e.g.
|
|
354
355
|
* asset publish, lifecycle hooks — see the same setting without
|
|
@@ -360,7 +361,48 @@ function ensureWarnAfter(opts) {
|
|
|
360
361
|
* destroy paths don't wait to begin with — so `destroy --no-wait`
|
|
361
362
|
* would be a no-op flag.
|
|
362
363
|
*/
|
|
363
|
-
const noWaitOption = new Option("--no-wait", "Skip waiting for async resources to stabilize (CloudFront, RDS, ElastiCache, NAT Gateway, Lambda MicroVM Image)");
|
|
364
|
+
const noWaitOption = new Option("--no-wait", "Skip waiting for async resources to stabilize (CloudFront, RDS, ElastiCache, NAT Gateway, EC2 Instance, ELBv2 LoadBalancer, Lambda MicroVM Image)");
|
|
365
|
+
/**
|
|
366
|
+
* Opt in to the stabilization waits cdkd deliberately SKIPS by default:
|
|
367
|
+
* the ones where CloudFormation waits and Terraform does not. Today that
|
|
368
|
+
* is ECS Service steady state (create and update).
|
|
369
|
+
*
|
|
370
|
+
* `--no-wait`, the default, and `--full-wait` are three points on one
|
|
371
|
+
* axis, from least to most waiting:
|
|
372
|
+
*
|
|
373
|
+
* - `--no-wait` skip the stabilization waits cdkd performs by default
|
|
374
|
+
* - (default) wait where CloudFormation and Terraform agree
|
|
375
|
+
* - `--full-wait` also wait where only CloudFormation waits
|
|
376
|
+
*
|
|
377
|
+
* Which one is right depends on whether anything downstream needs the
|
|
378
|
+
* resource to actually be serving, NOT on where the deploy runs: cutting
|
|
379
|
+
* billed CI minutes is a legitimate reason to pass `--no-wait` in CI, and
|
|
380
|
+
* a local smoke test is a legitimate reason to pass `--full-wait` on a
|
|
381
|
+
* laptop.
|
|
382
|
+
*
|
|
383
|
+
* Setting the flag mutates `process.env.CDKD_FULL_WAIT='true'`, the same
|
|
384
|
+
* mechanism `--no-wait` uses, so nested call paths see it without
|
|
385
|
+
* threading it through every signature.
|
|
386
|
+
*
|
|
387
|
+
* Mutually exclusive with `--no-wait` (see {@link validateWaitFlags}).
|
|
388
|
+
* Per-resource-type wait control is deliberately NOT expressible with
|
|
389
|
+
* these two whole-run flags; that would be a separate feature.
|
|
390
|
+
*
|
|
391
|
+
* Deploy-only, like `--no-wait`.
|
|
392
|
+
*/
|
|
393
|
+
const fullWaitOption = new Option("--full-wait", "Also wait for stabilizations cdkd skips by default, matching CloudFormation (ECS Service steady state)");
|
|
394
|
+
/**
|
|
395
|
+
* Reject `--no-wait --full-wait`. They sit at opposite ends of one axis,
|
|
396
|
+
* so a combination has no coherent meaning: the user is asking to both
|
|
397
|
+
* skip waits and add waits in the same run.
|
|
398
|
+
*
|
|
399
|
+
* Note the Commander shape: `--no-wait` is the negation form of a boolean
|
|
400
|
+
* `wait` option, so it surfaces as `wait === false` rather than as a
|
|
401
|
+
* `noWait` key.
|
|
402
|
+
*/
|
|
403
|
+
function validateWaitFlags(opts) {
|
|
404
|
+
if (opts.wait === false && opts.fullWait === true) throw new Error("--no-wait and --full-wait cannot be combined: --no-wait skips stabilization waits, --full-wait adds them. Pick one.");
|
|
405
|
+
}
|
|
364
406
|
/**
|
|
365
407
|
* Drop the CDK-injected defensive `DependsOn` edges from VPC Lambdas (and
|
|
366
408
|
* adjacent IAM Role / Policy / Lambda::Url / EventSourceMapping resources)
|
|
@@ -537,6 +579,7 @@ const deployOptions = [
|
|
|
537
579
|
new Option("--no-capture-observed-state", "Skip capturing AWS-current properties after each create/update (adds a fire-and-forget readCurrentState per resource so cdkd drift can compare against the real deploy-time AWS snapshot instead of the template). On by default. Disable when deploy speed matters more than rich drift detection — falls back to comparing against template properties (the pre-v3 behavior)."),
|
|
538
580
|
new Option("--prefix-user-supplied-names", "Opt in to LEGACY behavior: prepend the stack name to physical names the user explicitly supplied in their CDK code (e.g. `new iam.Role(this, \"X\", { roleName: \"my-role\" })` → AWS resource named `MyStack-my-role` instead of `my-role`). Since v0.94.0 the default is to NOT prefix user-supplied names — this flag restores the pre-v0.94.0 behavior on Pattern B providers (IAM Role / User / Group / InstanceProfile / ELBv2 LoadBalancer / TargetGroup). Enable via this flag, CDKD_PREFIX_USER_SUPPLIED_NAMES=true, or cdk.json context.cdkd.prefixUserSuppliedNames=true. Applies to `cdkd deploy` only.").default(false),
|
|
539
581
|
noWaitOption,
|
|
582
|
+
fullWaitOption,
|
|
540
583
|
aggressiveVpcParallelOption,
|
|
541
584
|
new Option("-e, --exclusively", "Only deploy requested stacks, do not include dependencies").default(false),
|
|
542
585
|
allowUnsupportedTypesOption,
|
|
@@ -2870,6 +2913,7 @@ var IAMManagedPolicyProvider = class {
|
|
|
2870
2913
|
attributes: { PolicyArn: policyArn }
|
|
2871
2914
|
};
|
|
2872
2915
|
} catch (error) {
|
|
2916
|
+
if (error instanceof CdkdError) throw error;
|
|
2873
2917
|
const cause = error instanceof Error ? error : void 0;
|
|
2874
2918
|
throw new ProvisioningError(`Failed to create IAM managed policy ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, policyName, cause);
|
|
2875
2919
|
}
|
|
@@ -14831,6 +14875,15 @@ var EC2Provider = class {
|
|
|
14831
14875
|
}
|
|
14832
14876
|
}
|
|
14833
14877
|
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
14878
|
+
try {
|
|
14879
|
+
return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
14880
|
+
} catch (error) {
|
|
14881
|
+
if (error instanceof CdkdError) throw error;
|
|
14882
|
+
const cause = error instanceof Error ? error : void 0;
|
|
14883
|
+
throw new ProvisioningError(`Failed to update EC2 resource ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
14884
|
+
}
|
|
14885
|
+
}
|
|
14886
|
+
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
14834
14887
|
switch (resourceType) {
|
|
14835
14888
|
case "AWS::EC2::VPC": return this.updateVpc(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
14836
14889
|
case "AWS::EC2::Subnet": return this.updateSubnet(logicalId, physicalId);
|
|
@@ -15213,7 +15266,8 @@ var EC2Provider = class {
|
|
|
15213
15266
|
const publicIp = response.PublicIp;
|
|
15214
15267
|
await this.applyTags(allocationId, properties, logicalId);
|
|
15215
15268
|
const instanceId = properties["InstanceId"];
|
|
15216
|
-
if (instanceId) {
|
|
15269
|
+
if (instanceId) if (process.env["CDKD_NO_WAIT"] === "true") this.logger.warn(`EIP ${logicalId} (${allocationId}) was NOT associated with ${instanceId}: --no-wait skips the instance running-state wait, and AssociateAddress rejects an instance that is not yet running. Verify and associate once the instance is running: aws ec2 describe-instances --instance-ids ${instanceId} --query 'Reservations[].Instances[].State.Name' && aws ec2 associate-address --allocation-id ${allocationId} --instance-id ${instanceId}`);
|
|
15270
|
+
else {
|
|
15217
15271
|
await this.ec2Client.send(new AssociateAddressCommand({
|
|
15218
15272
|
AllocationId: allocationId,
|
|
15219
15273
|
InstanceId: instanceId
|
|
@@ -15240,11 +15294,16 @@ var EC2Provider = class {
|
|
|
15240
15294
|
await this.applyTagDiff(allocationId, previousProperties["Tags"], properties["Tags"]);
|
|
15241
15295
|
const oldInstanceId = previousProperties["InstanceId"];
|
|
15242
15296
|
const newInstanceId = properties["InstanceId"];
|
|
15243
|
-
if (oldInstanceId !== newInstanceId) if (newInstanceId)
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15297
|
+
if (oldInstanceId !== newInstanceId) if (newInstanceId) try {
|
|
15298
|
+
await this.ec2Client.send(new AssociateAddressCommand({
|
|
15299
|
+
AllocationId: allocationId,
|
|
15300
|
+
InstanceId: newInstanceId,
|
|
15301
|
+
AllowReassociation: true
|
|
15302
|
+
}));
|
|
15303
|
+
} catch (error) {
|
|
15304
|
+
if (process.env["CDKD_NO_WAIT"] === "true" && this.isIncorrectInstanceStateError(error)) this.logger.warn(`EIP ${logicalId} (${allocationId}) was NOT associated with ${newInstanceId}: --no-wait skips the instance running-state wait, and AssociateAddress rejects an instance that is not yet running. Verify and associate once the instance is running: aws ec2 describe-instances --instance-ids ${newInstanceId} --query 'Reservations[].Instances[].State.Name' && aws ec2 associate-address --allocation-id ${allocationId} --instance-id ${newInstanceId} --allow-reassociation`);
|
|
15305
|
+
else throw error;
|
|
15306
|
+
}
|
|
15248
15307
|
else {
|
|
15249
15308
|
const associationId = (await this.ec2Client.send(new DescribeAddressesCommand({ AllocationIds: [allocationId] }))).Addresses?.[0]?.AssociationId;
|
|
15250
15309
|
if (associationId) await this.ec2Client.send(new DisassociateAddressCommand({ AssociationId: associationId }));
|
|
@@ -15358,7 +15417,7 @@ var EC2Provider = class {
|
|
|
15358
15417
|
client: this.ec2Client,
|
|
15359
15418
|
maxWaitTime: 900,
|
|
15360
15419
|
minDelay: 5,
|
|
15361
|
-
maxDelay:
|
|
15420
|
+
maxDelay: 10
|
|
15362
15421
|
}, { NatGatewayIds: [natGatewayId] });
|
|
15363
15422
|
this.logger.debug(`NatGateway ${natGatewayId} is available`);
|
|
15364
15423
|
} else this.logger.debug(`NatGateway ${natGatewayId} created (skipping available-state wait per --no-wait)`);
|
|
@@ -15394,7 +15453,7 @@ var EC2Provider = class {
|
|
|
15394
15453
|
client: this.ec2Client,
|
|
15395
15454
|
maxWaitTime: 900,
|
|
15396
15455
|
minDelay: 5,
|
|
15397
|
-
maxDelay:
|
|
15456
|
+
maxDelay: 10
|
|
15398
15457
|
}, { NatGatewayIds: [physicalId] });
|
|
15399
15458
|
} catch (error) {
|
|
15400
15459
|
this.logger.warn(`Wait for NatGateway ${physicalId} deletion did not complete cleanly: ${error instanceof Error ? error.message : String(error)} — proceeding with downstream delete steps`);
|
|
@@ -15481,6 +15540,7 @@ var EC2Provider = class {
|
|
|
15481
15540
|
...createResult.attributes && { attributes: createResult.attributes }
|
|
15482
15541
|
};
|
|
15483
15542
|
} catch (error) {
|
|
15543
|
+
if (error instanceof CdkdError) throw error;
|
|
15484
15544
|
const cause = error instanceof Error ? error : void 0;
|
|
15485
15545
|
throw new ProvisioningError(`Failed to update Route ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
15486
15546
|
}
|
|
@@ -15735,6 +15795,7 @@ var EC2Provider = class {
|
|
|
15735
15795
|
...createResult.attributes && { attributes: createResult.attributes }
|
|
15736
15796
|
};
|
|
15737
15797
|
} catch (error) {
|
|
15798
|
+
if (error instanceof CdkdError) throw error;
|
|
15738
15799
|
const cause = error instanceof Error ? error : void 0;
|
|
15739
15800
|
throw new ProvisioningError(`Failed to update SecurityGroupIngress ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
15740
15801
|
}
|
|
@@ -15799,14 +15860,19 @@ var EC2Provider = class {
|
|
|
15799
15860
|
const instanceId = instance.InstanceId;
|
|
15800
15861
|
try {
|
|
15801
15862
|
await this.applyTags(instanceId, properties, logicalId);
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15863
|
+
if (process.env["CDKD_NO_WAIT"] !== "true") {
|
|
15864
|
+
this.logger.debug(`Waiting for instance ${instanceId} to be running...`);
|
|
15865
|
+
await waitUntilInstanceRunning({
|
|
15866
|
+
client: this.ec2Client,
|
|
15867
|
+
maxWaitTime: 300,
|
|
15868
|
+
minDelay: 2,
|
|
15869
|
+
maxDelay: 5
|
|
15870
|
+
}, { InstanceIds: [instanceId] });
|
|
15871
|
+
} else this.logger.debug(`Instance ${instanceId} launched (skipping running-state wait per --no-wait)`);
|
|
15872
|
+
if (iamInstanceProfile) if (process.env["CDKD_NO_WAIT"] === "true") {
|
|
15873
|
+
const profileRef = iamInstanceProfile.arn ?? iamInstanceProfile.name;
|
|
15874
|
+
this.logger.warn(`Skipped the IAM instance profile association check for ${logicalId} (${instanceId}) because --no-wait leaves the instance in 'pending', where AssociateIamInstanceProfile is rejected. RunInstances associates the profile asynchronously and can complete with NO profile attached when the profile was created moments earlier. Verify with: aws ec2 describe-iam-instance-profile-associations --filters Name=instance-id,Values=${instanceId} — and if it is missing, re-associate with: aws ec2 associate-iam-instance-profile --instance-id ${instanceId} --iam-instance-profile ${iamInstanceProfile.arn ? `Arn=${profileRef}` : `Name=${profileRef}`}`);
|
|
15875
|
+
} else await this.ensureIamInstanceProfileAssociated(instanceId, iamInstanceProfile.arn, iamInstanceProfile.name, logicalId);
|
|
15810
15876
|
const runningInstance = (await this.ec2Client.send(new DescribeInstancesCommand({ InstanceIds: [instanceId] }))).Reservations?.[0]?.Instances?.[0];
|
|
15811
15877
|
const attributes = {
|
|
15812
15878
|
InstanceId: instanceId,
|
|
@@ -16054,8 +16120,8 @@ var EC2Provider = class {
|
|
|
16054
16120
|
await waitUntilInstanceTerminated({
|
|
16055
16121
|
client: this.ec2Client,
|
|
16056
16122
|
maxWaitTime: 300,
|
|
16057
|
-
minDelay:
|
|
16058
|
-
maxDelay:
|
|
16123
|
+
minDelay: 2,
|
|
16124
|
+
maxDelay: 5
|
|
16059
16125
|
}, { InstanceIds: [physicalId] });
|
|
16060
16126
|
this.logger.debug(`EC2 Instance ${logicalId} terminated: ${physicalId}`);
|
|
16061
16127
|
return;
|
|
@@ -16544,6 +16610,21 @@ var EC2Provider = class {
|
|
|
16544
16610
|
return message.includes("DependencyViolation") || message.includes("has dependencies and cannot be deleted") || message.includes("Network has some mapped public address");
|
|
16545
16611
|
}
|
|
16546
16612
|
/**
|
|
16613
|
+
* AWS rejects AssociateAddress (and several other instance operations)
|
|
16614
|
+
* against an instance that is not `running` / `stopped` with the
|
|
16615
|
+
* `IncorrectInstanceState` code. Under --no-wait that is the expected
|
|
16616
|
+
* outcome for an instance created in the same deploy, not a transient
|
|
16617
|
+
* fault -- it stays true exactly until the wait --no-wait skipped would
|
|
16618
|
+
* have completed.
|
|
16619
|
+
*/
|
|
16620
|
+
isIncorrectInstanceStateError(error) {
|
|
16621
|
+
if (!(error instanceof Error)) return false;
|
|
16622
|
+
const code = error.Code ?? "";
|
|
16623
|
+
const name = error.name ?? "";
|
|
16624
|
+
if (code === "IncorrectInstanceState" || name === "IncorrectInstanceState") return true;
|
|
16625
|
+
return error.message.includes("IncorrectInstanceState");
|
|
16626
|
+
}
|
|
16627
|
+
/**
|
|
16547
16628
|
* Indirect sleep so unit tests can swap in a fake-timer-aware
|
|
16548
16629
|
* implementation via `vi.useFakeTimers()` without monkey-patching
|
|
16549
16630
|
* `setTimeout` globally.
|
|
@@ -19926,6 +20007,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
19926
20007
|
}
|
|
19927
20008
|
};
|
|
19928
20009
|
} catch (error) {
|
|
20010
|
+
if (error instanceof CdkdError) throw error;
|
|
19929
20011
|
const cause = error instanceof Error ? error : void 0;
|
|
19930
20012
|
throw new ProvisioningError(`Failed to update CloudFront Distribution ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
19931
20013
|
}
|
|
@@ -22057,6 +22139,23 @@ var ECSProvider = class {
|
|
|
22057
22139
|
}))).service;
|
|
22058
22140
|
if (!service || !service.serviceArn) throw new Error("CreateService did not return service ARN");
|
|
22059
22141
|
this.logger.debug(`Successfully created ECS service ${logicalId}: ${service.serviceArn}`);
|
|
22142
|
+
try {
|
|
22143
|
+
await this.settleService(logicalId, service.serviceName ?? service.serviceArn, properties["Cluster"]);
|
|
22144
|
+
} catch (waitError) {
|
|
22145
|
+
try {
|
|
22146
|
+
await client.send(new DeleteServiceCommand({
|
|
22147
|
+
cluster: properties["Cluster"],
|
|
22148
|
+
service: service.serviceArn,
|
|
22149
|
+
force: true
|
|
22150
|
+
}));
|
|
22151
|
+
this.logger.debug(`Cleaned up partially-created ECS service ${logicalId} (${service.serviceArn}) after the steady-state wait failed`);
|
|
22152
|
+
} catch (cleanupError) {
|
|
22153
|
+
const cleanupCluster = properties["Cluster"];
|
|
22154
|
+
const clusterArg = cleanupCluster ? ` --cluster ${cleanupCluster}` : "";
|
|
22155
|
+
this.logger.warn(`Failed to clean up partially-created ECS service ${logicalId} (${service.serviceArn}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws ecs delete-service${clusterArg} --service ${service.serviceArn} --force`);
|
|
22156
|
+
}
|
|
22157
|
+
throw waitError;
|
|
22158
|
+
}
|
|
22060
22159
|
return {
|
|
22061
22160
|
physicalId: service.serviceArn,
|
|
22062
22161
|
attributes: {
|
|
@@ -22069,6 +22168,43 @@ var ECSProvider = class {
|
|
|
22069
22168
|
throw new ProvisioningError(`Failed to create ECS service ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, serviceName, cause);
|
|
22070
22169
|
}
|
|
22071
22170
|
}
|
|
22171
|
+
/**
|
|
22172
|
+
* Settle an ECS Service according to the run's wait mode.
|
|
22173
|
+
*
|
|
22174
|
+
* cdkd does NOT wait for steady state by default (issue #1275). The three
|
|
22175
|
+
* engines genuinely disagree on what "done" means for a Service:
|
|
22176
|
+
* CloudFormation waits for steady state, Terraform's `aws_ecs_service`
|
|
22177
|
+
* defaults `wait_for_steady_state` to false, and nothing downstream needs
|
|
22178
|
+
* the service to be running (`Fn::GetAtt` yields Name / ServiceArn, both
|
|
22179
|
+
* valid the instant CreateService returns). cdkd takes the fast side and
|
|
22180
|
+
* documents the divergence.
|
|
22181
|
+
*
|
|
22182
|
+
* There is deliberately no health probe on the default path. Right after
|
|
22183
|
+
* CreateService a healthy service and a doomed one are indistinguishable
|
|
22184
|
+
* (`ACTIVE`, `runningCount: 0`, `rolloutState: IN_PROGRESS`); a circuit
|
|
22185
|
+
* breaker failure surfaces tens of seconds to minutes later. A one-shot
|
|
22186
|
+
* check would warn on every deploy AND imply a guarantee ("no warning, so
|
|
22187
|
+
* the rollout was fine") it cannot support. The INFO line instead hands
|
|
22188
|
+
* over the exact command that CAN answer the question.
|
|
22189
|
+
*/
|
|
22190
|
+
async settleService(logicalId, serviceRef, cluster) {
|
|
22191
|
+
if (process.env["CDKD_FULL_WAIT"] === "true") {
|
|
22192
|
+
this.logger.debug(`Waiting for ECS service ${logicalId} to reach steady state...`);
|
|
22193
|
+
await waitUntilServicesStable({
|
|
22194
|
+
client: this.getClient(),
|
|
22195
|
+
maxWaitTime: 600,
|
|
22196
|
+
minDelay: 5,
|
|
22197
|
+
maxDelay: 10
|
|
22198
|
+
}, {
|
|
22199
|
+
cluster,
|
|
22200
|
+
services: [serviceRef]
|
|
22201
|
+
});
|
|
22202
|
+
this.logger.debug(`ECS service ${logicalId} reached steady state`);
|
|
22203
|
+
return;
|
|
22204
|
+
}
|
|
22205
|
+
const clusterArg = cluster ? ` --cluster ${cluster}` : "";
|
|
22206
|
+
this.logger.info(`ECS service ${logicalId} accepted (not waiting for steady state; pass --full-wait to wait). To wait manually: aws ecs wait services-stable${clusterArg} --services ${serviceRef}`);
|
|
22207
|
+
}
|
|
22072
22208
|
async updateService(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
22073
22209
|
this.logger.debug(`Updating ECS service ${logicalId}: ${physicalId}`);
|
|
22074
22210
|
const client = this.getClient();
|
|
@@ -22110,6 +22246,7 @@ var ECSProvider = class {
|
|
|
22110
22246
|
serviceRegistries: serviceRegistriesInput
|
|
22111
22247
|
}))).service;
|
|
22112
22248
|
if (service?.serviceArn) await this.applyTagDiff(service.serviceArn, previousProperties["Tags"], properties["Tags"]);
|
|
22249
|
+
await this.settleService(logicalId, service?.serviceName ?? physicalId, properties["Cluster"]);
|
|
22113
22250
|
return {
|
|
22114
22251
|
physicalId,
|
|
22115
22252
|
wasReplaced: false,
|
|
@@ -23127,7 +23264,14 @@ var ECSProvider = class {
|
|
|
23127
23264
|
*
|
|
23128
23265
|
* WHY: ELBv2 Create* APIs are synchronous - the CC API adds unnecessary polling
|
|
23129
23266
|
* overhead for operations that complete immediately. This SDK provider eliminates
|
|
23130
|
-
* that polling
|
|
23267
|
+
* that polling.
|
|
23268
|
+
*
|
|
23269
|
+
* "The API is synchronous" is NOT the same claim as "the resource is ready",
|
|
23270
|
+
* and an earlier version of this comment conflated the two. TargetGroup and
|
|
23271
|
+
* Listener genuinely are ready on return; a LoadBalancer comes back with
|
|
23272
|
+
* `State.Code: provisioning` and is not servable for another 90-180s. So
|
|
23273
|
+
* createLoadBalancer waits for `active` (skippable with --no-wait) while the
|
|
23274
|
+
* other two do not.
|
|
23131
23275
|
*/
|
|
23132
23276
|
var ELBv2Provider = class {
|
|
23133
23277
|
elbv2Client;
|
|
@@ -23188,6 +23332,15 @@ var ELBv2Provider = class {
|
|
|
23188
23332
|
}
|
|
23189
23333
|
}
|
|
23190
23334
|
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
23335
|
+
try {
|
|
23336
|
+
return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
23337
|
+
} catch (error) {
|
|
23338
|
+
if (error instanceof CdkdError) throw error;
|
|
23339
|
+
const cause = error instanceof Error ? error : void 0;
|
|
23340
|
+
throw new ProvisioningError(`Failed to update ELBv2 resource ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
23341
|
+
}
|
|
23342
|
+
}
|
|
23343
|
+
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
23191
23344
|
switch (resourceType) {
|
|
23192
23345
|
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.updateLoadBalancer(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
23193
23346
|
case "AWS::ElasticLoadBalancingV2::TargetGroup": return this.updateTargetGroup(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
@@ -23222,6 +23375,16 @@ var ELBv2Provider = class {
|
|
|
23222
23375
|
const lbArn = lb.LoadBalancerArn;
|
|
23223
23376
|
this.logger.debug(`Successfully created LoadBalancer ${logicalId}: ${lbArn}`);
|
|
23224
23377
|
try {
|
|
23378
|
+
if (process.env["CDKD_NO_WAIT"] !== "true") {
|
|
23379
|
+
this.logger.debug(`Waiting for LoadBalancer ${logicalId} to reach active state...`);
|
|
23380
|
+
await waitUntilLoadBalancerAvailable({
|
|
23381
|
+
client: this.getClient(),
|
|
23382
|
+
maxWaitTime: 600,
|
|
23383
|
+
minDelay: 5,
|
|
23384
|
+
maxDelay: 10
|
|
23385
|
+
}, { LoadBalancerArns: [lbArn] });
|
|
23386
|
+
this.logger.debug(`LoadBalancer ${logicalId} is active`);
|
|
23387
|
+
} else this.logger.debug(`LoadBalancer ${logicalId} created (skipping active-state wait per --no-wait)`);
|
|
23225
23388
|
const lbAttributes = properties["LoadBalancerAttributes"];
|
|
23226
23389
|
if (lbAttributes && lbAttributes.length > 0) {
|
|
23227
23390
|
await this.getClient().send(new ModifyLoadBalancerAttributesCommand({
|
|
@@ -33342,6 +33505,15 @@ var KinesisStreamConsumerProvider = class {
|
|
|
33342
33505
|
* "use cdkd deploy --replace" suggestion.
|
|
33343
33506
|
*/
|
|
33344
33507
|
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
33508
|
+
try {
|
|
33509
|
+
return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
33510
|
+
} catch (error) {
|
|
33511
|
+
if (error instanceof CdkdError) throw error;
|
|
33512
|
+
const cause = error instanceof Error ? error : void 0;
|
|
33513
|
+
throw new ProvisioningError(`Failed to update Kinesis stream consumer ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
33514
|
+
}
|
|
33515
|
+
}
|
|
33516
|
+
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
33345
33517
|
const newConsumerName = properties["ConsumerName"];
|
|
33346
33518
|
const oldConsumerName = previousProperties["ConsumerName"];
|
|
33347
33519
|
const newStreamArn = properties["StreamARN"];
|
|
@@ -37223,6 +37395,15 @@ var FirehoseProvider = class {
|
|
|
37223
37395
|
* can `cdkd deploy --replace`.
|
|
37224
37396
|
*/
|
|
37225
37397
|
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
37398
|
+
try {
|
|
37399
|
+
return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
37400
|
+
} catch (error) {
|
|
37401
|
+
if (error instanceof CdkdError) throw error;
|
|
37402
|
+
const cause = error instanceof Error ? error : void 0;
|
|
37403
|
+
throw new ProvisioningError(`Failed to update Firehose delivery stream ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
37404
|
+
}
|
|
37405
|
+
}
|
|
37406
|
+
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
37226
37407
|
this.logger.debug(`Updating Firehose delivery stream ${logicalId}: ${physicalId}`);
|
|
37227
37408
|
const destKey = this.findDestinationKey(properties);
|
|
37228
37409
|
const prevDestKey = this.findDestinationKey(previousProperties);
|
|
@@ -40240,6 +40421,15 @@ var S3TablesProvider = class {
|
|
|
40240
40421
|
}
|
|
40241
40422
|
}
|
|
40242
40423
|
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
40424
|
+
try {
|
|
40425
|
+
return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
40426
|
+
} catch (error) {
|
|
40427
|
+
if (error instanceof CdkdError) throw error;
|
|
40428
|
+
const cause = error instanceof Error ? error : void 0;
|
|
40429
|
+
throw new ProvisioningError(`Failed to update S3 Tables resource ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
40430
|
+
}
|
|
40431
|
+
}
|
|
40432
|
+
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
40243
40433
|
if (resourceType === "AWS::S3Tables::Table") await this.applyTableTagsDiff(logicalId, physicalId, resourceType, previousProperties["Tags"], properties["Tags"]);
|
|
40244
40434
|
else if (resourceType === "AWS::S3Tables::TableBucket") await this.applyTableBucketTagsDiff(logicalId, physicalId, resourceType, previousProperties["Tags"], properties["Tags"]);
|
|
40245
40435
|
else this.logger.debug(`Update is no-op for ${resourceType} ${logicalId}`);
|
|
@@ -41987,6 +42177,7 @@ var ACMCertificateProvider = class {
|
|
|
41987
42177
|
}
|
|
41988
42178
|
};
|
|
41989
42179
|
} catch (error) {
|
|
42180
|
+
if (error instanceof CdkdError) throw error;
|
|
41990
42181
|
const cause = error instanceof Error ? error : void 0;
|
|
41991
42182
|
throw new ProvisioningError(`Failed to create ACM certificate ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
41992
42183
|
}
|
|
@@ -42524,11 +42715,13 @@ async function deployCommand(stacks, options) {
|
|
|
42524
42715
|
}
|
|
42525
42716
|
warnIfDeprecatedRegion(options);
|
|
42526
42717
|
validateResourceTimeouts(options);
|
|
42718
|
+
validateWaitFlags(options);
|
|
42527
42719
|
await applyRoleArnIfSet({
|
|
42528
42720
|
roleArn: options.roleArn,
|
|
42529
42721
|
region: options.region
|
|
42530
42722
|
});
|
|
42531
42723
|
if (!options.wait) process.env["CDKD_NO_WAIT"] = "true";
|
|
42724
|
+
if (options.fullWait) process.env["CDKD_FULL_WAIT"] = "true";
|
|
42532
42725
|
warnDeprecatedNoPrefixCliFlag();
|
|
42533
42726
|
const skipPrefix = resolveSkipPrefix({ prefixUserSuppliedNames: options.prefixUserSuppliedNames });
|
|
42534
42727
|
if (skipPrefix) logger.debug("Skipping stack-name prefix on user-supplied physical names (default since v0.94.0)");
|
|
@@ -62167,7 +62360,7 @@ function createMigrateCommand() {
|
|
|
62167
62360
|
*/
|
|
62168
62361
|
function buildProgram() {
|
|
62169
62362
|
const program = new Command();
|
|
62170
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.267.
|
|
62363
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.267.18");
|
|
62171
62364
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
62172
62365
|
const { profile } = actionCommand.optsWithGlobals();
|
|
62173
62366
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|