@go-to-k/cdkd 0.268.2 → 0.268.4
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 +21 -9
- package/dist/{asg-provider-gaXfXSH0.js → asg-provider-iWNOeyib.js} +2 -2
- package/dist/{asg-provider-gaXfXSH0.js.map → asg-provider-iWNOeyib.js.map} +1 -1
- package/dist/cli.js +94 -25
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BEjF-h_6.js → deploy-engine--qUEKkTR.js} +18 -8
- package/dist/deploy-engine--qUEKkTR.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BEjF-h_6.js.map +0 -1
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
|
|
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--qUEKkTR.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-iWNOeyib.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";
|
|
@@ -404,6 +404,28 @@ function validateWaitFlags(opts) {
|
|
|
404
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
405
|
}
|
|
406
406
|
/**
|
|
407
|
+
* Validate the wait-flag pair and project it onto the process env the
|
|
408
|
+
* providers read. One helper instead of three separate lines in deploy.ts
|
|
409
|
+
* so the validation, the two mode envs, and the availability marker cannot
|
|
410
|
+
* drift apart individually (issue #1291 item 6 — the wiring had no unit
|
|
411
|
+
* coverage because it lived inline in the deploy command's action).
|
|
412
|
+
*
|
|
413
|
+
* - `CDKD_NO_WAIT` — set when `--no-wait` was passed; providers skip
|
|
414
|
+
* convenience stabilization waits.
|
|
415
|
+
* - `CDKD_FULL_WAIT` — set when `--full-wait` was passed; providers add
|
|
416
|
+
* the CloudFormation-side waits cdkd skips by default.
|
|
417
|
+
* - `CDKD_WAIT_FLAGS_AVAILABLE` — set unconditionally by commands that
|
|
418
|
+
* DECLARE the wait flags (today: deploy). Providers gate flag-mentioning
|
|
419
|
+
* hints on it, so `cdkd drift --revert` reaching the same provider code
|
|
420
|
+
* never advertises a flag drift does not accept (issue #1291 item 1).
|
|
421
|
+
*/
|
|
422
|
+
function applyWaitFlagEnv(opts) {
|
|
423
|
+
validateWaitFlags(opts);
|
|
424
|
+
process.env["CDKD_WAIT_FLAGS_AVAILABLE"] = "true";
|
|
425
|
+
if (opts.wait === false) process.env["CDKD_NO_WAIT"] = "true";
|
|
426
|
+
if (opts.fullWait === true) process.env["CDKD_FULL_WAIT"] = "true";
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
407
429
|
* Drop the CDK-injected defensive `DependsOn` edges from VPC Lambdas (and
|
|
408
430
|
* adjacent IAM Role / Policy / Lambda::Url / EventSourceMapping resources)
|
|
409
431
|
* onto the private subnet's `DefaultRoute` / `RouteTableAssociation`. CDK
|
|
@@ -8446,7 +8468,9 @@ var LambdaFunctionProvider = class {
|
|
|
8446
8468
|
try {
|
|
8447
8469
|
await waitUntilFunctionUpdatedV2({
|
|
8448
8470
|
client: this.lambdaClient,
|
|
8449
|
-
maxWaitTime: this.functionUpdateMaxWaitSeconds
|
|
8471
|
+
maxWaitTime: this.functionUpdateMaxWaitSeconds,
|
|
8472
|
+
minDelay: 1,
|
|
8473
|
+
maxDelay: 5
|
|
8450
8474
|
}, { FunctionName: functionName });
|
|
8451
8475
|
} catch (error) {
|
|
8452
8476
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -15619,11 +15643,12 @@ var EC2Provider = class {
|
|
|
15619
15643
|
try {
|
|
15620
15644
|
const ingressRules = properties["SecurityGroupIngress"];
|
|
15621
15645
|
const egressRules = properties["SecurityGroupEgress"];
|
|
15622
|
-
await Promise.
|
|
15646
|
+
const firstRejection = (await Promise.allSettled([
|
|
15623
15647
|
this.applyTags(groupId, properties, logicalId),
|
|
15624
15648
|
this.authorizeInlineIngress(groupId, ingressRules),
|
|
15625
15649
|
this.applyInlineEgress(groupId, egressRules)
|
|
15626
|
-
]);
|
|
15650
|
+
])).find((r) => r.status === "rejected");
|
|
15651
|
+
if (firstRejection) throw firstRejection.reason;
|
|
15627
15652
|
} catch (innerError) {
|
|
15628
15653
|
try {
|
|
15629
15654
|
await this.ec2Client.send(new DeleteSecurityGroupCommand({ GroupId: groupId }));
|
|
@@ -16978,6 +17003,15 @@ var EC2Provider = class {
|
|
|
16978
17003
|
}
|
|
16979
17004
|
if (instance.Placement?.Tenancy !== void 0) result["Tenancy"] = instance.Placement.Tenancy;
|
|
16980
17005
|
if (instance.IamInstanceProfile?.Arn !== void 0) result["IamInstanceProfile"] = instance.IamInstanceProfile.Arn;
|
|
17006
|
+
else if (process.env["CDKD_NO_WAIT"] === "true" && instance.State?.Name === "pending") try {
|
|
17007
|
+
const live = (await this.ec2Client.send(new DescribeIamInstanceProfileAssociationsCommand({ Filters: [{
|
|
17008
|
+
Name: "instance-id",
|
|
17009
|
+
Values: [physicalId]
|
|
17010
|
+
}] }))).IamInstanceProfileAssociations?.find((a) => a.State === "associated" || a.State === "associating");
|
|
17011
|
+
if (live?.IamInstanceProfile?.Arn !== void 0) result["IamInstanceProfile"] = live.IamInstanceProfile.Arn;
|
|
17012
|
+
} catch (error) {
|
|
17013
|
+
this.logger.warn(`Could not backfill IamInstanceProfile for ${physicalId} during the --no-wait capture (${error instanceof Error ? error.message : String(error)}); the field is omitted from the observed snapshot`);
|
|
17014
|
+
}
|
|
16981
17015
|
const volumeIds = (instance.BlockDeviceMappings ?? []).filter((m) => m.Ebs?.VolumeId !== void 0).map((m) => m.Ebs.VolumeId);
|
|
16982
17016
|
let volumesById = /* @__PURE__ */ new Map();
|
|
16983
17017
|
if (volumeIds.length > 0) try {
|
|
@@ -20047,6 +20081,14 @@ var CloudFrontOACProvider = class {
|
|
|
20047
20081
|
* `assertRegionMatch()` confirms the client is pointed at the region the
|
|
20048
20082
|
* resource was created in (a region mismatch would otherwise silently
|
|
20049
20083
|
* "succeed" while leaving the real resource behind).
|
|
20084
|
+
*
|
|
20085
|
+
* A `Get` that succeeds but carries no `ETag` is a hard error here for the
|
|
20086
|
+
* same reason it is in {@link update}: `IfMatch: undefined` reaches AWS as
|
|
20087
|
+
* a missing required parameter, and the resulting SDK/AWS rejection says
|
|
20088
|
+
* nothing about the `Get` being what came back short. On the DELETE path
|
|
20089
|
+
* that opacity is worse than on update — the failure surfaces during
|
|
20090
|
+
* `cdkd destroy`, where the user's next question is "is the OAC still
|
|
20091
|
+
* there?", so the message has to name the actual cause.
|
|
20050
20092
|
*/
|
|
20051
20093
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
20052
20094
|
this.logger.debug(`Deleting CloudFront Origin Access Control ${logicalId}: ${physicalId}`);
|
|
@@ -20062,6 +20104,7 @@ var CloudFrontOACProvider = class {
|
|
|
20062
20104
|
}
|
|
20063
20105
|
throw error;
|
|
20064
20106
|
}
|
|
20107
|
+
if (!etag) throw new Error("GetOriginAccessControl did not return ETag");
|
|
20065
20108
|
await this.cloudFrontClient.send(new DeleteOriginAccessControlCommand({
|
|
20066
20109
|
Id: physicalId,
|
|
20067
20110
|
IfMatch: etag
|
|
@@ -20155,6 +20198,18 @@ var CloudFrontOACProvider = class {
|
|
|
20155
20198
|
* copy that exists to (a) fail loudly when a required field is missing
|
|
20156
20199
|
* rather than letting the SDK reject with an opaque serialization error,
|
|
20157
20200
|
* and (b) keep unknown extra keys out of the request.
|
|
20201
|
+
*
|
|
20202
|
+
* All four required fields are checked for a NON-EMPTY string, not merely
|
|
20203
|
+
* for `typeof === 'string'`. `''` is the shape an unresolved intrinsic or a
|
|
20204
|
+
* `Fn::Sub` over a missing value most often collapses into, and CloudFront
|
|
20205
|
+
* rejects it just as surely as it rejects an absent field — so letting it
|
|
20206
|
+
* through would defeat the whole point of (a): the user would get AWS's
|
|
20207
|
+
* `InvalidArgument` instead of a message naming the field cdkd could see
|
|
20208
|
+
* was blank. The three type/behavior fields are additionally CFn enums
|
|
20209
|
+
* (`s3` / `mediastore` / `lambda` / `mediapackagev2`; `always` / `never` /
|
|
20210
|
+
* `no-override`; `sigv4`), for which the empty string is never a member.
|
|
20211
|
+
* `Description` is deliberately not in this set — it is genuinely optional
|
|
20212
|
+
* and `''` is a legitimate value that clears it.
|
|
20158
20213
|
*/
|
|
20159
20214
|
toSdkConfig(value, logicalId, resourceType, physicalId) {
|
|
20160
20215
|
const config = value ?? {};
|
|
@@ -20162,11 +20217,12 @@ var CloudFrontOACProvider = class {
|
|
|
20162
20217
|
const originType = config["OriginAccessControlOriginType"];
|
|
20163
20218
|
const signingBehavior = config["SigningBehavior"];
|
|
20164
20219
|
const signingProtocol = config["SigningProtocol"];
|
|
20220
|
+
const nonEmpty = (value) => typeof value === "string" && value.length > 0;
|
|
20165
20221
|
const missing = [
|
|
20166
|
-
|
|
20167
|
-
|
|
20168
|
-
|
|
20169
|
-
|
|
20222
|
+
nonEmpty(name) ? void 0 : "Name",
|
|
20223
|
+
nonEmpty(originType) ? void 0 : "OriginAccessControlOriginType",
|
|
20224
|
+
nonEmpty(signingBehavior) ? void 0 : "SigningBehavior",
|
|
20225
|
+
nonEmpty(signingProtocol) ? void 0 : "SigningProtocol"
|
|
20170
20226
|
].filter((field) => field !== void 0);
|
|
20171
20227
|
if (missing.length > 0) throw new ProvisioningError(`CloudFront Origin Access Control ${logicalId}: OriginAccessControlConfig is missing required field(s): ${missing.join(", ")}`, resourceType, logicalId, physicalId);
|
|
20172
20228
|
const description = config["Description"];
|
|
@@ -22449,19 +22505,19 @@ var ECSProvider = class {
|
|
|
22449
22505
|
try {
|
|
22450
22506
|
await this.settleService(logicalId, service.serviceName ?? service.serviceArn, properties["Cluster"]);
|
|
22451
22507
|
} catch (waitError) {
|
|
22508
|
+
const cleanupCluster = properties["Cluster"];
|
|
22509
|
+
const clusterArg = cleanupCluster ? ` --cluster ${cleanupCluster}` : "";
|
|
22452
22510
|
try {
|
|
22453
22511
|
await client.send(new DeleteServiceCommand({
|
|
22454
22512
|
cluster: properties["Cluster"],
|
|
22455
22513
|
service: service.serviceArn,
|
|
22456
22514
|
force: true
|
|
22457
22515
|
}));
|
|
22458
|
-
this.logger.
|
|
22516
|
+
this.logger.warn(`Deleted partially-created ECS service ${logicalId} (${service.serviceArn}) after the steady-state wait failed, so the next deploy's CreateService does not collide on the name. Its stopped tasks remain inspectable for about an hour: aws ecs list-tasks${clusterArg} --desired-status STOPPED`);
|
|
22459
22517
|
} catch (cleanupError) {
|
|
22460
|
-
const cleanupCluster = properties["Cluster"];
|
|
22461
|
-
const clusterArg = cleanupCluster ? ` --cluster ${cleanupCluster}` : "";
|
|
22462
22518
|
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`);
|
|
22463
22519
|
}
|
|
22464
|
-
throw waitError;
|
|
22520
|
+
throw new Error(`ECS service ${logicalId} did not reach steady state under --full-wait: ${waitError instanceof Error ? waitError.message : String(waitError)}. Inspect why its tasks stopped (stopped tasks stay visible for about an hour): aws ecs list-tasks${clusterArg} --desired-status STOPPED, then aws ecs describe-tasks${clusterArg} --tasks <task-arn> --query 'tasks[].[stoppedReason,containers[].reason]'`, { cause: waitError });
|
|
22465
22521
|
}
|
|
22466
22522
|
return {
|
|
22467
22523
|
physicalId: service.serviceArn,
|
|
@@ -22510,7 +22566,8 @@ var ECSProvider = class {
|
|
|
22510
22566
|
return;
|
|
22511
22567
|
}
|
|
22512
22568
|
const clusterArg = cluster ? ` --cluster ${cluster}` : "";
|
|
22513
|
-
|
|
22569
|
+
const fullWaitHint = process.env["CDKD_WAIT_FLAGS_AVAILABLE"] === "true" ? "; pass --full-wait to wait" : "";
|
|
22570
|
+
this.logger.info(`ECS service ${logicalId} accepted (not waiting for steady state${fullWaitHint}). To wait manually: aws ecs wait services-stable${clusterArg} --services ${serviceRef}`);
|
|
22514
22571
|
}
|
|
22515
22572
|
async updateService(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
22516
22573
|
this.logger.debug(`Updating ECS service ${logicalId}: ${physicalId}`);
|
|
@@ -43056,13 +43113,11 @@ async function deployCommand(stacks, options) {
|
|
|
43056
43113
|
}
|
|
43057
43114
|
warnIfDeprecatedRegion(options);
|
|
43058
43115
|
validateResourceTimeouts(options);
|
|
43059
|
-
|
|
43116
|
+
applyWaitFlagEnv(options);
|
|
43060
43117
|
await applyRoleArnIfSet({
|
|
43061
43118
|
roleArn: options.roleArn,
|
|
43062
43119
|
region: options.region
|
|
43063
43120
|
});
|
|
43064
|
-
if (!options.wait) process.env["CDKD_NO_WAIT"] = "true";
|
|
43065
|
-
if (options.fullWait) process.env["CDKD_FULL_WAIT"] = "true";
|
|
43066
43121
|
warnDeprecatedNoPrefixCliFlag();
|
|
43067
43122
|
const skipPrefix = resolveSkipPrefix({ prefixUserSuppliedNames: options.prefixUserSuppliedNames });
|
|
43068
43123
|
if (skipPrefix) logger.debug("Skipping stack-name prefix on user-supplied physical names (default since v0.94.0)");
|
|
@@ -43921,7 +43976,9 @@ async function retireCloudFormationStack(options) {
|
|
|
43921
43976
|
}
|
|
43922
43977
|
if (updateRan) await waitUntilStackUpdateComplete({
|
|
43923
43978
|
client: cfnClient,
|
|
43924
|
-
maxWaitTime: 1800
|
|
43979
|
+
maxWaitTime: 1800,
|
|
43980
|
+
minDelay: 5,
|
|
43981
|
+
maxDelay: 10
|
|
43925
43982
|
}, { StackName: cfnStackName });
|
|
43926
43983
|
} finally {
|
|
43927
43984
|
const allCleanups = [...s3Cleanup ? [s3Cleanup] : [], ...nestedCleanups];
|
|
@@ -43937,7 +43994,9 @@ async function retireCloudFormationStack(options) {
|
|
|
43937
43994
|
await cfnClient.send(new DeleteStackCommand({ StackName: cfnStackName }));
|
|
43938
43995
|
await waitUntilStackDeleteComplete({
|
|
43939
43996
|
client: cfnClient,
|
|
43940
|
-
maxWaitTime: 1800
|
|
43997
|
+
maxWaitTime: 1800,
|
|
43998
|
+
minDelay: 5,
|
|
43999
|
+
maxDelay: 10
|
|
43941
44000
|
}, { StackName: cfnStackName });
|
|
43942
44001
|
logger.info(`✓ CloudFormation stack '${cfnStackName}' retired. AWS resources are now solely managed by cdkd.`);
|
|
43943
44002
|
return { outcome: modified ? "retired" : "no-template-change" };
|
|
@@ -48130,7 +48189,9 @@ async function submitImportChangeSet(cfnClient, stackName, template, resourcesTo
|
|
|
48130
48189
|
try {
|
|
48131
48190
|
await waitUntilChangeSetCreateComplete({
|
|
48132
48191
|
client: cfnClient,
|
|
48133
|
-
maxWaitTime: 600
|
|
48192
|
+
maxWaitTime: 600,
|
|
48193
|
+
minDelay: 2,
|
|
48194
|
+
maxDelay: 5
|
|
48134
48195
|
}, {
|
|
48135
48196
|
StackName: stackName,
|
|
48136
48197
|
ChangeSetName: changeSetName
|
|
@@ -48159,7 +48220,9 @@ async function submitImportChangeSet(cfnClient, stackName, template, resourcesTo
|
|
|
48159
48220
|
}));
|
|
48160
48221
|
await waitUntilStackImportComplete({
|
|
48161
48222
|
client: cfnClient,
|
|
48162
|
-
maxWaitTime: 3600
|
|
48223
|
+
maxWaitTime: 3600,
|
|
48224
|
+
minDelay: 5,
|
|
48225
|
+
maxDelay: 10
|
|
48163
48226
|
}, { StackName: stackName });
|
|
48164
48227
|
} catch (err) {
|
|
48165
48228
|
const failureSummary = await collectImportFailureSummary(cfnClient, stackName).catch(() => "");
|
|
@@ -48259,7 +48322,9 @@ async function flipStackToUpdateComplete(cfnClient, cfnStackName, parameters) {
|
|
|
48259
48322
|
}));
|
|
48260
48323
|
await waitUntilStackUpdateComplete({
|
|
48261
48324
|
client: cfnClient,
|
|
48262
|
-
maxWaitTime: 1800
|
|
48325
|
+
maxWaitTime: 1800,
|
|
48326
|
+
minDelay: 5,
|
|
48327
|
+
maxDelay: 10
|
|
48263
48328
|
}, { StackName: cfnStackName });
|
|
48264
48329
|
}
|
|
48265
48330
|
/**
|
|
@@ -48858,7 +48923,9 @@ async function executeUpdateChangeSet(cfnClient, stackName, template, parameters
|
|
|
48858
48923
|
try {
|
|
48859
48924
|
await waitUntilChangeSetCreateComplete({
|
|
48860
48925
|
client: cfnClient,
|
|
48861
|
-
maxWaitTime: 600
|
|
48926
|
+
maxWaitTime: 600,
|
|
48927
|
+
minDelay: 2,
|
|
48928
|
+
maxDelay: 5
|
|
48862
48929
|
}, {
|
|
48863
48930
|
StackName: stackName,
|
|
48864
48931
|
ChangeSetName: changeSetName
|
|
@@ -48887,7 +48954,9 @@ async function executeUpdateChangeSet(cfnClient, stackName, template, parameters
|
|
|
48887
48954
|
}));
|
|
48888
48955
|
await waitUntilStackUpdateComplete({
|
|
48889
48956
|
client: cfnClient,
|
|
48890
|
-
maxWaitTime: 3600
|
|
48957
|
+
maxWaitTime: 3600,
|
|
48958
|
+
minDelay: 5,
|
|
48959
|
+
maxDelay: 10
|
|
48891
48960
|
}, { StackName: stackName });
|
|
48892
48961
|
} catch (err) {
|
|
48893
48962
|
await cfnClient.send(new DeleteChangeSetCommand({
|
|
@@ -62702,7 +62771,7 @@ function createMigrateCommand() {
|
|
|
62702
62771
|
*/
|
|
62703
62772
|
function buildProgram() {
|
|
62704
62773
|
const program = new Command();
|
|
62705
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.268.
|
|
62774
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.268.4");
|
|
62706
62775
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
62707
62776
|
const { profile } = actionCommand.optsWithGlobals();
|
|
62708
62777
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|