@go-to-k/cdkd 0.219.8 → 0.219.9
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.
|
@@ -5,7 +5,7 @@ import { DeleteObjectCommand, GetBucketLocationCommand, GetObjectCommand, HeadBu
|
|
|
5
5
|
import { CloudControlClient, CreateResourceCommand, DeleteResourceCommand, GetResourceCommand, GetResourceRequestStatusCommand, ListResourcesCommand, UpdateResourceCommand } from "@aws-sdk/client-cloudcontrol";
|
|
6
6
|
import { AttachRolePolicyCommand, CreateRoleCommand, DeleteRoleCommand, DeleteRolePermissionsBoundaryCommand, DeleteRolePolicyCommand, DetachRolePolicyCommand, GetRoleCommand, GetRolePolicyCommand, IAMClient, ListAttachedRolePoliciesCommand, ListInstanceProfilesForRoleCommand, ListRolePoliciesCommand, ListRoleTagsCommand, ListRolesCommand, NoSuchEntityException, PutRolePermissionsBoundaryCommand, PutRolePolicyCommand, RemoveRoleFromInstanceProfileCommand, TagRoleCommand, UntagRoleCommand, UpdateAssumeRolePolicyCommand, UpdateRoleCommand } from "@aws-sdk/client-iam";
|
|
7
7
|
import { PublishCommand, SNSClient } from "@aws-sdk/client-sns";
|
|
8
|
-
import { GetFunctionUrlConfigCommand, InvokeCommand, LambdaClient, UpdateFunctionConfigurationCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
|
|
8
|
+
import { GetFunctionCommand, GetFunctionUrlConfigCommand, InvokeCommand, LambdaClient, UpdateFunctionConfigurationCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
|
|
9
9
|
import { AssumeRoleCommand, GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
|
|
10
10
|
import { DescribeAvailabilityZonesCommand, DescribeImagesCommand, DescribeLaunchTemplatesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, EC2Client } from "@aws-sdk/client-ec2";
|
|
11
11
|
import { DescribeTableCommand } from "@aws-sdk/client-dynamodb";
|
|
@@ -7539,6 +7539,10 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
7539
7539
|
return;
|
|
7540
7540
|
}
|
|
7541
7541
|
if (typeof serviceToken !== "string") throw new ProvisioningError(`Custom Resource ${logicalId}: ServiceToken is not a resolved string ARN (got ${typeof serviceToken}). This usually indicates state was written by a pre-fix cdkd import; re-run \`cdkd import\` or \`cdkd state orphan <stack>\` to recover.`, resourceType, logicalId, physicalId);
|
|
7542
|
+
if (!this.isSnsServiceToken(serviceToken) && await this.isBackingLambdaGone(serviceToken)) {
|
|
7543
|
+
this.logger.warn(`Backing Lambda for custom resource ${logicalId} no longer exists (${serviceToken}); treating the custom resource as already deleted`);
|
|
7544
|
+
return;
|
|
7545
|
+
}
|
|
7542
7546
|
try {
|
|
7543
7547
|
const cfnResponse = await this.invokeCustomResourceWithRetry(serviceToken, logicalId, "Delete", (invocation) => ({
|
|
7544
7548
|
RequestType: "Delete",
|
|
@@ -7563,6 +7567,25 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
7563
7567
|
return serviceToken.startsWith("arn:aws:sns:");
|
|
7564
7568
|
}
|
|
7565
7569
|
/**
|
|
7570
|
+
* Single GetFunction probe used by the delete path's fail-fast pre-check
|
|
7571
|
+
* (issue #804). Returns true ONLY on a definitive
|
|
7572
|
+
* `ResourceNotFoundException` — the one signal that proves the backing
|
|
7573
|
+
* Lambda is gone and the delete handler can never run. Any other failure
|
|
7574
|
+
* (throttle, IAM denial, network) is inconclusive: fall through to the
|
|
7575
|
+
* normal invoke path, which has its own error handling and the lenient
|
|
7576
|
+
* delete catch.
|
|
7577
|
+
*/
|
|
7578
|
+
async isBackingLambdaGone(serviceToken) {
|
|
7579
|
+
try {
|
|
7580
|
+
await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: serviceToken }));
|
|
7581
|
+
return false;
|
|
7582
|
+
} catch (error) {
|
|
7583
|
+
if (error.name === "ResourceNotFoundException") return true;
|
|
7584
|
+
this.logger.debug(`GetFunction pre-check for ${serviceToken} failed inconclusively (${error instanceof Error ? error.message : String(error)}); proceeding with the normal delete invoke`);
|
|
7585
|
+
return false;
|
|
7586
|
+
}
|
|
7587
|
+
}
|
|
7588
|
+
/**
|
|
7566
7589
|
* Invoke a custom resource, retrying on a *transient IAM-authorization*
|
|
7567
7590
|
* FAILED response.
|
|
7568
7591
|
*
|
|
@@ -12488,4 +12511,4 @@ var DeployEngine = class {
|
|
|
12488
12511
|
|
|
12489
12512
|
//#endregion
|
|
12490
12513
|
export { WorkGraph as A, resolveCaptureObservedState as B, DagBuilder as C, shouldRetainResource as D, S3StateBackend as E, runDockerStreaming as F, CFN_TEMPLATE_BODY_LIMIT as G, resolveStateBucketWithDefault as H, Synthesizer as I, findLargeInlineResources as J, CFN_TEMPLATE_URL_LIMIT as K, getDefaultStateBucketName as L, formatDockerLoginError as M, getDockerCmd as N, AssetPublisher as O, runDockerForeground as P, resolveBucketRegion as Q, getLegacyStateBucketName as R, DiffCalculator as S, LockManager as T, resolveStateBucketWithDefaultAndSource as U, resolveSkipPrefix as V, warnDeprecatedNoPrefixCliFlag as W, AssemblyReader as X, uploadCfnTemplate as Y, clearBucketRegionCache as Z, ProviderRegistry as _, withRetry as a, IntrinsicFunctionResolver as b, formatResourceLine as c, gray as d, green as f, collectInlinePolicyNamesManagedBySiblings as g, IAMRoleProvider as h, withResourceDeadline as i, buildDockerImage as j, stringifyValue as k, bold as l, yellow as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, isRetryableTransientError as o, red as p, MIGRATE_TMP_PREFIX as q, DeployEngine as r, IMPLICIT_DELETE_DEPENDENCIES as s, DEFAULT_RESOURCE_TIMEOUT_MS as t, cyan as u, findActionableSilentDrops as v, TemplateParser as w, applyRoleArnIfSet as x, CloudControlProvider as y, resolveApp as z };
|
|
12491
|
-
//# sourceMappingURL=deploy-engine-
|
|
12514
|
+
//# sourceMappingURL=deploy-engine-DVP4vDXG.js.map
|