@cdkd/cli 0.331.0 → 0.332.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/{asg-provider-CX1vIS2U.js → asg-provider-CwwgTp0h.js} +2 -2
- package/dist/{asg-provider-CX1vIS2U.js.map → asg-provider-CwwgTp0h.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{db-associated-roles-C6OzmodG.js → db-instance-modify-retry-B1PdmL5X.js} +42 -42
- package/dist/db-instance-modify-retry-B1PdmL5X.js.map +1 -0
- package/dist/{deploy-engine-CV-uC4wn.js → deploy-engine-5GASWIYI.js} +1447 -1216
- package/dist/deploy-engine-5GASWIYI.js.map +1 -0
- package/dist/{iam-role-provider-qO-1ttiR.js → iam-role-provider-Cp9ASoIg.js} +2 -2
- package/dist/{iam-role-provider-qO-1ttiR.js.map → iam-role-provider-Cp9ASoIg.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-CrnOI25j.js → neptune-provider-C9IhSshh.js} +3 -3
- package/dist/{neptune-provider-CrnOI25j.js.map → neptune-provider-C9IhSshh.js.map} +1 -1
- package/dist/{program-C9XGOVAc.js → program-CaHG8EBB.js} +22355 -22202
- package/dist/program-CaHG8EBB.js.map +1 -0
- package/dist/{provider-classes-zd-4wuDn.js → provider-classes-DdGvWb5T.js} +4358 -3717
- package/dist/provider-classes-DdGvWb5T.js.map +1 -0
- package/dist/rds-provider-BI5PcgWT.js +2439 -0
- package/dist/rds-provider-BI5PcgWT.js.map +1 -0
- package/dist/{version-CP8YzFQk.js → version-DXx2w7jk.js} +2 -2
- package/dist/{version-CP8YzFQk.js.map → version-DXx2w7jk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/db-associated-roles-C6OzmodG.js.map +0 -1
- package/dist/deploy-engine-CV-uC4wn.js.map +0 -1
- package/dist/program-C9XGOVAc.js.map +0 -1
- package/dist/provider-classes-zd-4wuDn.js.map +0 -1
- package/dist/rds-provider-uCvjWdCy.js +0 -2117
- package/dist/rds-provider-uCvjWdCy.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { f as __exportAll, l as s3ClientDefaults, r as getAwsClients } from "./a
|
|
|
2
2
|
import { $ as safeMsg, B as SAFE_MSG_ALTERED_CHAR, C as fallbackNamePropertyFor, D as getCurrentSkipPrefix, E as generatedNameFor, F as withNameGeneration, H as STACK_REF_MAX_CODE_POINTS, I as withSkipPrefix, J as displaySafe, K as displayAwsMessage, L as withStackScope, M as looksLikeCdkdGeneratedName, O as getCurrentStackInstanceId, P as stackInstanceNameSuffix, Q as plainIdentOr, R as withStackScopeBeforeStateRead, S as explicitNamePropertyFor, T as generateResourceNameWithFallback, U as UNRENDERABLE, V as SECRET_REF_MAX_CODE_POINTS, W as asIsMessage, X as isPasteableIdent, Y as displayStackName, a as safeStringify$1, b as currentNameGeneration, c as isStdoutReservedForPayload, f as currentLogLineMasker, j as isNameGeneration, k as getCurrentStackName, m as getLiveRenderer, n as describeAwsFailure, nt as truncateCodePoints, p as installLogLineMaskerSource, q as displayIdent, s as getLogger, t as VERBOSE_POINTER, tt as terminalSafe, v as alternateNamePropertiesFor, y as applyDefaultNameForFallback, z as withoutGeneratedFallbackName } from "./aws-failure-text-DiHodi76.js";
|
|
3
3
|
import { $ as isTerminalDeleteFailure, $n as physicalIdShownBesideCommand, $t as formatLockExpiry, An as MalformedProducerRecordRefusalError, Ar as isThrottlingError, At as stateOrphanRecordRemedy, B as normalizeAwsTagsToCfn, Bt as createdBeforeFailure, Cn as DeploymentNotApprovedError, Dr as retryClassificationText, Er as isTransientServerError, Et as logicalIdShown, F as assertRegionMatch, Fn as ResourceUpdateNotSupportedError, Ft as maskerOrIdentity, Gt as markAuxiliaryFailure, H as refusalTypeShown, Hn as isSoftAbort, Ht as hasCreatedBeforeFailure, It as withDerivedNameMasks, Jn as UNSHOWABLE_VALUE, Jt as replayMadeAnotherResource, K as ProtectionFlipRegistry, Kn as SHELL_ACTIVE, Kt as markCreatedBeforeFailure, Lt as RETRY_AUXILIARY_OWNER, M as RESOURCE_NOT_FOUND, Mr as markRedactedCause, Mt as createMaskedRetryLogger, N as isMarkedNotGone, Nn as ProvisioningError, Nr as wrapMaskedAwsError, Nt as isSecretDerivedValue, On as LockError, Ot as resourceTypeShown, P as markNotGone, Pn as ResourceTimeoutError, Pt as maskDeep, Qn as pasteableCommand, Rn as StateError, Rt as carryCreatedBeforeFailure, Sr as isAmbiguousOutcomeError, St as canonicalizeRoute53QueryName, Tn as IntrinsicResolutionRefusalError, Tr as isRetryableTransientError, Un as normalizeAwsError, Ut as isAuxiliaryFailure, V as quotedRemedyLogicalId, Vt as createdResourceIdentityBeforeFailure, W as resolveExplicitPhysicalId, Wt as isAuxiliaryMarkOf, Xt as buildForceUnlockCommand, Y as deleteWithProtectionCompensation, Yn as commandHole, Yt as UNREPRODUCIBLE_LOCK_CLAUSE, Zn as isInertUnquoted, _ as prepareRemovalForUpdate, _n as AssetError, _r as stripControlChars, an as DEFAULT_STATE_PREFIX, bn as CrossAccountSecretRefusalError, br as formatRetryClassificationSignals, bt as isInterruptedWaitError, cr as hasReplayMayCollide, dn as withPasteableAwsProfile, dr as isRecreateRetryableError, dt as pasteableAwsCommand, en as formatLockOperation, er as plainOrDescribed, fn as ambientClientDefaults, fr as isReplayedNameCollisionFrom, ft as protectedReplacementAdvice, gn as AccountIdUnavailableError, gr as escapeRegExp$3, gt as monotonicNowMs, h as withUnchangedSecretPrincipalLists, hn as credentialFingerprint, hr as relayedNameCollision, ht as ElapsedBudgetRegistry, i as reportCreatedResource, in as CUSTOM_RESOURCE_RESPONSE_PREFIX, ir as withheldTargetClause, it as runDeleteAttempt, j as withoutServerErrorRetries, jr as markNonRetryable, jt as createMaskedLogSinks, kn as MacroExpansionError, kr as isMarkedNonRetryable, kt as segmentAfterAnchor, ln as producerRecordKey, lr as isNameCollisionErrorFrom, mn as clientDefaultsFor, mr as markReplayMayCollide, mt as ElapsedBudget, n as clearCreatedReport, nn as recoveryCommandFlags, nr as shellBoundedDisplay, nt as protectionFlipKey, o as retractCreatedResource, on as injectiveKey, pn as ambientCredentialConfig, q as compensateProtectionFlip, qn as SHELL_ACTIVE_WHY, r as collectCreatedResources, rn as sanitizeRecoveryValue, rr as shellQuote, sr as isUpdateUnsupportedError, st as DELETION_PROTECTION_DOC_POINTER, t as CreatedResourceSink, tn as formatLockOwner, tr as quotedOrDescribed, tt as observeThenDisableProtection, u as holdsSecretDerivedEntry, ur as isNameCooldownError, v as removalWarning, vn as CdkdError, wn as DynamicReferenceRegionAmbiguousError, wr as isIamPropagationError, wt as compositeIdSeparatorRefusal, x as withoutInjectedRemovals, xn as DependencyError, xr as isAmbiguousCcHandlerErrorCode, xt as startInterruptWatch, z as isQuotableImportValue, zn as SynthesisError } from "./created-resource-sink-DBYrPwKg.js";
|
|
4
4
|
import { a as setAssumedRoleCredentials, c as ambientRegion, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, s as quietS3Logger, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-BLXFsfMa.js";
|
|
5
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { t as getCdkdVersion } from "./version-DXx2w7jk.js";
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -30,7 +30,7 @@ import { homedir, tmpdir } from "node:os";
|
|
|
30
30
|
import { DescribeListenersCommand, DescribeLoadBalancersCommand, ElasticLoadBalancingV2Client } from "@aws-sdk/client-elastic-load-balancing-v2";
|
|
31
31
|
import { DescribeKeyCommand, KMSClient, ListAliasesCommand } from "@aws-sdk/client-kms";
|
|
32
32
|
import { readFile } from "fs/promises";
|
|
33
|
-
import { isAbsolute as isAbsolute$1, resolve as resolve$1 } from "path";
|
|
33
|
+
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, resolve as resolve$1 } from "path";
|
|
34
34
|
import { CreateRepositoryCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, PutImageTagMutabilityCommand } from "@aws-sdk/client-ecr";
|
|
35
35
|
import { inspect, isDeepStrictEqual } from "node:util";
|
|
36
36
|
import { hostname } from "os";
|
|
@@ -2705,8 +2705,12 @@ function parseAssetManifestBody(content, manifestPath) {
|
|
|
2705
2705
|
}
|
|
2706
2706
|
var AssetManifestLoader = class {
|
|
2707
2707
|
logger = getLogger().child("AssetManifestLoader");
|
|
2708
|
-
async
|
|
2709
|
-
|
|
2708
|
+
async loadStackManifest(stack, fallbackDir) {
|
|
2709
|
+
if (stack.assetManifestPath) return this.loadManifest(dirname$1(stack.assetManifestPath), stack.stackName, basename$1(stack.assetManifestPath));
|
|
2710
|
+
return this.loadManifest(fallbackDir, stack.stackName);
|
|
2711
|
+
}
|
|
2712
|
+
async loadManifest(cdkOutputDir, stackName, fileName = `${stackName}.assets.json`) {
|
|
2713
|
+
const resolved = resolveAssemblyPath(cdkOutputDir, fileName);
|
|
2710
2714
|
if (!resolved.contained) throw new Error(`Asset manifest for stack ${displayStackName(stackName)} ${renderAssemblyPathEscape(resolved, cdkOutputDir)}`);
|
|
2711
2715
|
const manifestPath = resolved.path;
|
|
2712
2716
|
let content;
|
|
@@ -18121,6 +18125,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
|
|
|
18121
18125
|
"EngineLifecycleSupport",
|
|
18122
18126
|
"EngineMode",
|
|
18123
18127
|
"EngineVersion",
|
|
18128
|
+
"GlobalClusterIdentifier",
|
|
18124
18129
|
"KmsKeyId",
|
|
18125
18130
|
"ManageMasterUserPassword",
|
|
18126
18131
|
"MasterUserAuthenticationType",
|
|
@@ -18152,7 +18157,6 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
|
|
|
18152
18157
|
["Domain", "not yet implemented by cdkd"],
|
|
18153
18158
|
["DomainIAMRoleName", "not yet implemented by cdkd"],
|
|
18154
18159
|
["EnableGlobalWriteForwarding", "not yet implemented by cdkd"],
|
|
18155
|
-
["GlobalClusterIdentifier", "not yet implemented by cdkd"],
|
|
18156
18160
|
["Iops", "not yet implemented by cdkd"],
|
|
18157
18161
|
["ReplicationSourceIdentifier", "not yet implemented by cdkd"],
|
|
18158
18162
|
["RestoreToTime", "not yet implemented by cdkd"],
|
|
@@ -28703,7 +28707,7 @@ var CloudControlProvider = class {
|
|
|
28703
28707
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
28704
28708
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
28705
28709
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
28706
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
28710
|
+
const { ASGProvider } = await import("./asg-provider-CwwgTp0h.js");
|
|
28707
28711
|
const delegateRegion = ambientRegion();
|
|
28708
28712
|
let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
|
|
28709
28713
|
if (asgProvider === void 0) {
|
|
@@ -28812,7 +28816,7 @@ var CloudControlProvider = class {
|
|
|
28812
28816
|
const family = SDK_DELETE_FAMILIES.get(resourceType);
|
|
28813
28817
|
const cached = this.sdkDeleteDelegates.get(family);
|
|
28814
28818
|
if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
|
|
28815
|
-
const provider = family === "rds" ? new (await (import("./rds-provider-
|
|
28819
|
+
const provider = family === "rds" ? new (await (import("./rds-provider-BI5PcgWT.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-C9IhSshh.js"))).NeptuneProvider({ region: ccRegion });
|
|
28816
28820
|
this.sdkDeleteDelegates.set(family, {
|
|
28817
28821
|
region: ccRegion,
|
|
28818
28822
|
provider
|
|
@@ -29748,242 +29752,595 @@ function maskLeavesDeep(value) {
|
|
|
29748
29752
|
return "***";
|
|
29749
29753
|
}
|
|
29750
29754
|
|
|
29751
|
-
// src/provisioning/providers/custom-resource-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
+
// src/provisioning/providers/custom-resource/lambda-payload.ts
|
|
29756
|
+
function isCustomResourceResponsePayload(value) {
|
|
29757
|
+
if (typeof value !== "object" || value === null) return false;
|
|
29758
|
+
const payload = value;
|
|
29759
|
+
if ("PhysicalResourceId" in payload && typeof payload["PhysicalResourceId"] !== "string") return false;
|
|
29760
|
+
if ("Data" in payload) {
|
|
29761
|
+
if (typeof payload["Data"] !== "object" || payload["Data"] === null) return false;
|
|
29762
|
+
}
|
|
29763
|
+
return true;
|
|
29755
29764
|
}
|
|
29756
|
-
function
|
|
29757
|
-
|
|
29758
|
-
|
|
29759
|
-
|
|
29760
|
-
|
|
29761
|
-
|
|
29765
|
+
function parseLambdaPayload(payloadBytes, mask) {
|
|
29766
|
+
if (!payloadBytes) return {};
|
|
29767
|
+
const payloadString = Buffer.from(payloadBytes).toString();
|
|
29768
|
+
if (!payloadString || payloadString === "null" || payloadString === "\"\"") return {};
|
|
29769
|
+
const parsed = JSON.parse(payloadString);
|
|
29770
|
+
if (!isCustomResourceResponsePayload(parsed)) {
|
|
29771
|
+
if (mask === void 0) throw new Error(`Invalid Lambda response payload format: ${JSON.stringify(parsed)}`);
|
|
29772
|
+
throw new Error(`Invalid Lambda response payload format: ${JSON.stringify(maskDeep(parsed, mask))}`);
|
|
29773
|
+
}
|
|
29774
|
+
return parsed;
|
|
29775
|
+
}
|
|
29776
|
+
function asSentence(text) {
|
|
29777
|
+
return text.endsWith(".") ? text : `${text}.`;
|
|
29778
|
+
}
|
|
29779
|
+
function decodeInvokeLogTail(logResult) {
|
|
29780
|
+
if (!logResult) return void 0;
|
|
29762
29781
|
try {
|
|
29763
|
-
|
|
29782
|
+
const decoded = Buffer.from(logResult, "base64").toString("utf8");
|
|
29783
|
+
return decoded.length > 0 ? decoded : void 0;
|
|
29764
29784
|
} catch {
|
|
29765
|
-
|
|
29785
|
+
return;
|
|
29786
|
+
}
|
|
29787
|
+
}
|
|
29788
|
+
function lambdaStatusParts(response) {
|
|
29789
|
+
const config = response?.Configuration;
|
|
29790
|
+
if (typeof config !== "object" || config === null || Array.isArray(config)) return {
|
|
29791
|
+
parts: [],
|
|
29792
|
+
reasons: []
|
|
29793
|
+
};
|
|
29794
|
+
const fields = config;
|
|
29795
|
+
const status = [
|
|
29796
|
+
[
|
|
29797
|
+
"State",
|
|
29798
|
+
fields["State"],
|
|
29799
|
+
"shown"
|
|
29800
|
+
],
|
|
29801
|
+
[
|
|
29802
|
+
"StateReasonCode",
|
|
29803
|
+
fields["StateReasonCode"],
|
|
29804
|
+
"shown"
|
|
29805
|
+
],
|
|
29806
|
+
[
|
|
29807
|
+
"StateReason",
|
|
29808
|
+
fields["StateReason"],
|
|
29809
|
+
"withheld"
|
|
29810
|
+
],
|
|
29811
|
+
[
|
|
29812
|
+
"LastUpdateStatus",
|
|
29813
|
+
fields["LastUpdateStatus"],
|
|
29814
|
+
"shown"
|
|
29815
|
+
],
|
|
29816
|
+
[
|
|
29817
|
+
"LastUpdateStatusReasonCode",
|
|
29818
|
+
fields["LastUpdateStatusReasonCode"],
|
|
29819
|
+
"shown"
|
|
29820
|
+
],
|
|
29821
|
+
[
|
|
29822
|
+
"LastUpdateStatusReason",
|
|
29823
|
+
fields["LastUpdateStatusReason"],
|
|
29824
|
+
"withheld"
|
|
29825
|
+
]
|
|
29826
|
+
];
|
|
29827
|
+
const parts = [];
|
|
29828
|
+
const reasons = [];
|
|
29829
|
+
for (const [key, value, kind] of status) {
|
|
29830
|
+
if (typeof value !== "string" || value === "") continue;
|
|
29831
|
+
if (kind === "shown") parts.push(`${key}=${value}`);
|
|
29832
|
+
else {
|
|
29833
|
+
parts.push(`${key} withheld`);
|
|
29834
|
+
reasons.push(`${key}=${value}`);
|
|
29835
|
+
}
|
|
29766
29836
|
}
|
|
29767
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") refuse("must use http:// or https://");
|
|
29768
|
-
if (parsed.username !== "" || parsed.password !== "") refuse("must not carry user info");
|
|
29769
|
-
if (parsed.search !== "" || parsed.hash !== "") refuse("must not carry a query or fragment");
|
|
29770
29837
|
return {
|
|
29771
|
-
|
|
29772
|
-
|
|
29838
|
+
parts,
|
|
29839
|
+
reasons
|
|
29773
29840
|
};
|
|
29774
29841
|
}
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
|
|
29787
|
-
|
|
29842
|
+
|
|
29843
|
+
// src/provisioning/providers/custom-resource/lambda-waiter.ts
|
|
29844
|
+
var WaiterRejections = class {
|
|
29845
|
+
seen = /* @__PURE__ */ new Map();
|
|
29846
|
+
ordered = [];
|
|
29847
|
+
nonErrors = 0;
|
|
29848
|
+
record(error) {
|
|
29849
|
+
if (!(error instanceof Error)) {
|
|
29850
|
+
this.nonErrors += 1;
|
|
29851
|
+
return;
|
|
29852
|
+
}
|
|
29853
|
+
let byMessage = this.seen.get(error.name);
|
|
29854
|
+
if (byMessage === void 0) {
|
|
29855
|
+
byMessage = /* @__PURE__ */ new Map();
|
|
29856
|
+
this.seen.set(error.name, byMessage);
|
|
29857
|
+
}
|
|
29858
|
+
const entry = byMessage.get(error.message);
|
|
29859
|
+
if (entry === void 0) {
|
|
29860
|
+
const created = {
|
|
29861
|
+
error,
|
|
29862
|
+
count: 1
|
|
29863
|
+
};
|
|
29864
|
+
byMessage.set(error.message, created);
|
|
29865
|
+
this.ordered.push(created);
|
|
29866
|
+
} else entry.count += 1;
|
|
29867
|
+
}
|
|
29868
|
+
entries() {
|
|
29869
|
+
return [...this.ordered];
|
|
29870
|
+
}
|
|
29871
|
+
};
|
|
29872
|
+
function observingLambdaClient(client, rejections) {
|
|
29873
|
+
const send = client.send.bind(client);
|
|
29874
|
+
const observed = Object.create(client);
|
|
29875
|
+
Object.defineProperty(observed, "send", { value: (...args) => {
|
|
29876
|
+
const result = send(...args);
|
|
29877
|
+
if (!(result instanceof Promise)) return result;
|
|
29878
|
+
return result.catch((error) => {
|
|
29879
|
+
rejections.record(error);
|
|
29880
|
+
throw error;
|
|
29881
|
+
});
|
|
29882
|
+
} });
|
|
29883
|
+
return observed;
|
|
29788
29884
|
}
|
|
29789
|
-
|
|
29790
|
-
const
|
|
29791
|
-
|
|
29792
|
-
const credentials = config?.credentials;
|
|
29793
|
-
return new S3Client({
|
|
29794
|
-
...ambientClientDefaults(),
|
|
29795
|
-
...s3ClientDefaults({ explicitEndpoint: true }),
|
|
29796
|
-
...typeof region === "string" && region !== "" && { region },
|
|
29797
|
-
...credentials !== void 0 && { credentials },
|
|
29798
|
-
endpoint: endpoint.url
|
|
29799
|
-
});
|
|
29885
|
+
function rejectionStatus(error) {
|
|
29886
|
+
const status = error.$metadata?.httpStatusCode;
|
|
29887
|
+
return typeof status === "number" ? status : void 0;
|
|
29800
29888
|
}
|
|
29801
|
-
|
|
29802
|
-
|
|
29803
|
-
|
|
29804
|
-
const CUSTOM_RESOURCE_RESPONSE_EXPIRATION_DAYS = 1;
|
|
29805
|
-
const CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_PREFIX = `${CUSTOM_RESOURCE_RESPONSE_PREFIX}/cdkd-1`;
|
|
29806
|
-
function buildCustomResourceResponseLifecycleRule(legacyPrefix) {
|
|
29807
|
-
const prefix = CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_PREFIX;
|
|
29808
|
-
return {
|
|
29809
|
-
ID: CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID,
|
|
29810
|
-
Status: "Enabled",
|
|
29811
|
-
...legacyPrefix ? { Prefix: prefix } : { Filter: { Prefix: prefix } },
|
|
29812
|
-
Expiration: { Days: 1 },
|
|
29813
|
-
NoncurrentVersionExpiration: { NoncurrentDays: 1 }
|
|
29814
|
-
};
|
|
29889
|
+
function carriesResponseBody(error) {
|
|
29890
|
+
const e = error;
|
|
29891
|
+
return e.$responseBodyText !== void 0 || e.$response !== void 0 && e.$fault === void 0 || error.name === "SyntaxError" || error.message.includes("Deserialization error");
|
|
29815
29892
|
}
|
|
29816
|
-
|
|
29817
|
-
const
|
|
29818
|
-
const
|
|
29819
|
-
if (
|
|
29820
|
-
|
|
29821
|
-
|
|
29893
|
+
function rejectionLine(error, count) {
|
|
29894
|
+
const status = rejectionStatus(error);
|
|
29895
|
+
const prefix = `(x${count}) ${status === void 0 ? "" : `${status}: `}`;
|
|
29896
|
+
if (carriesResponseBody(error)) return safeMsg`${prefix}${error.name} (response body withheld)`;
|
|
29897
|
+
return safeMsg`${prefix}${describeAwsFailure(error).summary}`;
|
|
29898
|
+
}
|
|
29899
|
+
function waiterRejectionDebugLines(rejections) {
|
|
29900
|
+
const lines = [];
|
|
29901
|
+
for (const { error, count } of rejections.entries()) {
|
|
29902
|
+
const described = describeAwsFailure(error);
|
|
29903
|
+
if (!described.redacted || carriesResponseBody(error)) continue;
|
|
29904
|
+
const status = rejectionStatus(error);
|
|
29905
|
+
lines.push(`(x${count}) ${status === void 0 ? "" : `${status}: `}${error.name}: ${described.detail}`);
|
|
29906
|
+
}
|
|
29907
|
+
return lines;
|
|
29908
|
+
}
|
|
29909
|
+
function describeLambdaWaiterFailure(error, rejections) {
|
|
29910
|
+
if (!(error instanceof Error)) return void 0;
|
|
29911
|
+
let parsed;
|
|
29822
29912
|
try {
|
|
29823
|
-
|
|
29824
|
-
} catch
|
|
29825
|
-
return
|
|
29913
|
+
parsed = JSON.parse(error.message);
|
|
29914
|
+
} catch {
|
|
29915
|
+
return;
|
|
29826
29916
|
}
|
|
29827
|
-
if (
|
|
29828
|
-
|
|
29829
|
-
|
|
29917
|
+
if (typeof parsed !== "object" || parsed === null || !("state" in parsed)) return void 0;
|
|
29918
|
+
const result = parsed;
|
|
29919
|
+
const observed = typeof result.observedResponses === "object" && result.observedResponses !== null && !Array.isArray(result.observedResponses) ? result.observedResponses : {};
|
|
29920
|
+
const { parts, reasons } = lambdaStatusParts(result.reason);
|
|
29921
|
+
if (parts.length === 0) for (const key of Object.keys(observed).reverse()) {
|
|
29922
|
+
let response;
|
|
29923
|
+
try {
|
|
29924
|
+
response = JSON.parse(key);
|
|
29925
|
+
} catch {
|
|
29926
|
+
continue;
|
|
29927
|
+
}
|
|
29928
|
+
const observedStatus = lambdaStatusParts(response);
|
|
29929
|
+
if (observedStatus.parts.length > 0) {
|
|
29930
|
+
parts.push(...observedStatus.parts);
|
|
29931
|
+
reasons.push(...observedStatus.reasons);
|
|
29932
|
+
break;
|
|
29933
|
+
}
|
|
29934
|
+
}
|
|
29935
|
+
const lines = [];
|
|
29936
|
+
let payloads = 0;
|
|
29937
|
+
let rejectionKeys = 0;
|
|
29938
|
+
for (const [key, count] of Object.entries(observed)) if (key.startsWith("{") || key.startsWith("[")) payloads += 1;
|
|
29939
|
+
else if (/^\d{3}: OK$/.test(key)) lines.push(typeof count === "number" ? `(x${count}) ${key}` : key);
|
|
29940
|
+
else rejectionKeys += 1;
|
|
29941
|
+
const recorded = rejections.entries();
|
|
29942
|
+
for (const { error: rejection, count } of recorded) lines.push(rejectionLine(rejection, count));
|
|
29943
|
+
if (lines.length > 0) parts.push(`observed: ${lines.join("; ")}`);
|
|
29944
|
+
if (payloads > 0) parts.push(`${payloads} observed response(s) withheld`);
|
|
29945
|
+
const nonErrors = rejections.nonErrors;
|
|
29946
|
+
if (nonErrors > 0) parts.push(`${nonErrors} non-Error rejection(s) withheld`);
|
|
29947
|
+
if (recorded.length === 0 && nonErrors === 0 && rejectionKeys > 0) parts.push(`${rejectionKeys} observed error message(s) withheld`);
|
|
29948
|
+
const state = typeof result.state === "string" ? result.state : "failure";
|
|
29949
|
+
const reason = typeof result.reason === "string" && result.reason !== "" ? `: ${result.reason}` : "";
|
|
29950
|
+
return {
|
|
29951
|
+
text: `${error.name} (waiter ${state}${reason}; ${parts.length > 0 ? parts.join(", ") : "no function status reported"}). ` + (reasons.length > 0 ? `${VERBOSE_POINTER} ` : "") + "The waiter's raw payload is withheld because it embeds the whole GetFunction response, environment variables included; run `aws lambda get-function` for the detail.",
|
|
29952
|
+
reasons
|
|
29830
29953
|
};
|
|
29831
|
-
|
|
29832
|
-
|
|
29833
|
-
|
|
29834
|
-
|
|
29835
|
-
const
|
|
29836
|
-
const
|
|
29954
|
+
}
|
|
29955
|
+
function withholdWaiterPayload(error, rejections, debug) {
|
|
29956
|
+
const failure = describeLambdaWaiterFailure(error, rejections);
|
|
29957
|
+
if (failure === void 0 || !(error instanceof Error)) return void 0;
|
|
29958
|
+
for (const reason of failure.reasons) debug(safeMsg`Lambda waiter status reason: ${reason}`);
|
|
29959
|
+
const described = failure.text;
|
|
29960
|
+
const header = `${error.name}: ${error.message}`;
|
|
29961
|
+
const stack = typeof error.stack === "string" ? error.stack : "";
|
|
29837
29962
|
try {
|
|
29838
|
-
|
|
29839
|
-
|
|
29840
|
-
|
|
29841
|
-
|
|
29842
|
-
|
|
29843
|
-
})
|
|
29844
|
-
|
|
29845
|
-
|
|
29846
|
-
|
|
29847
|
-
|
|
29963
|
+
Object.defineProperty(error, "message", {
|
|
29964
|
+
value: described,
|
|
29965
|
+
writable: true,
|
|
29966
|
+
configurable: true,
|
|
29967
|
+
enumerable: false
|
|
29968
|
+
});
|
|
29969
|
+
Object.defineProperty(error, "stack", {
|
|
29970
|
+
value: stack.startsWith(header) ? `${error.name}: ${described}${stack.slice(header.length)}` : `${error.name}: ${described}`,
|
|
29971
|
+
writable: true,
|
|
29972
|
+
configurable: true,
|
|
29973
|
+
enumerable: false
|
|
29974
|
+
});
|
|
29975
|
+
} catch {}
|
|
29976
|
+
return described;
|
|
29848
29977
|
}
|
|
29849
|
-
|
|
29978
|
+
function describeWaiterFailure(error, rejections, debug) {
|
|
29979
|
+
const withheld = withholdWaiterPayload(error, rejections, debug);
|
|
29980
|
+
if (withheld !== void 0) return withheld;
|
|
29981
|
+
return `${error instanceof Error ? error.name : "Error"} (no function status reported). The waiter's raw payload is withheld because it embeds the whole GetFunction response, environment variables included; run \`aws lambda get-function\` for the detail.`;
|
|
29982
|
+
}
|
|
29983
|
+
async function waitForLambdaFunctionActive(client, functionArn, abortSignal, maxWaitSeconds = 600) {
|
|
29984
|
+
const rejections = new WaiterRejections();
|
|
29850
29985
|
try {
|
|
29851
|
-
|
|
29852
|
-
|
|
29853
|
-
|
|
29854
|
-
|
|
29855
|
-
|
|
29856
|
-
|
|
29857
|
-
|
|
29858
|
-
};
|
|
29986
|
+
await waitUntilFunctionActiveV2({
|
|
29987
|
+
client: observingLambdaClient(client, rejections),
|
|
29988
|
+
maxWaitTime: maxWaitSeconds,
|
|
29989
|
+
minDelay: 1,
|
|
29990
|
+
maxDelay: 5,
|
|
29991
|
+
...abortSignal ? { abortSignal } : {}
|
|
29992
|
+
}, { FunctionName: functionArn });
|
|
29859
29993
|
} catch (error) {
|
|
29860
|
-
|
|
29861
|
-
|
|
29862
|
-
|
|
29863
|
-
};
|
|
29864
|
-
return { failed: failedOutcome("GetBucketLifecycleConfiguration", error) };
|
|
29994
|
+
const log = getLogger().child("LambdaActiveWait");
|
|
29995
|
+
for (const line of waiterRejectionDebugLines(rejections)) log.debug(safeMsg`Active waiter for ${functionArn} observed ${line}`);
|
|
29996
|
+
throw markNonRetryable(new Error(`Lambda function ${functionArn} did not reach the Active state: ${describeWaiterFailure(error, rejections, (line) => log.debug(line))}`, { cause: error }));
|
|
29865
29997
|
}
|
|
29866
29998
|
}
|
|
29867
|
-
|
|
29868
|
-
|
|
29869
|
-
|
|
29870
|
-
|
|
29871
|
-
|
|
29872
|
-
|
|
29873
|
-
|
|
29874
|
-
|
|
29875
|
-
|
|
29999
|
+
const LAMBDA_FUNCTION_ARN = /^arn:aws(?:-[a-z]+)*:lambda:[a-z0-9-]+:\d{12}:function:[\w-]+(?::[\w$-]+)?$/;
|
|
30000
|
+
const REFERENCED_LAMBDA_MAX_DEPTH = 8;
|
|
30001
|
+
const REFERENCED_LAMBDA_MAX_ARNS = 16;
|
|
30002
|
+
function collectReferencedLambdaFunctionArns(properties, excludeArn, maxArns = 16) {
|
|
30003
|
+
const found = /* @__PURE__ */ new Set();
|
|
30004
|
+
const walk = (value, depth) => {
|
|
30005
|
+
if (found.size >= maxArns || depth > 8) return;
|
|
30006
|
+
if (typeof value === "string") {
|
|
30007
|
+
if (value !== excludeArn && LAMBDA_FUNCTION_ARN.test(value)) found.add(value);
|
|
30008
|
+
return;
|
|
30009
|
+
}
|
|
30010
|
+
if (Array.isArray(value)) {
|
|
30011
|
+
for (const item of value) walk(item, depth + 1);
|
|
30012
|
+
return;
|
|
30013
|
+
}
|
|
30014
|
+
if (value !== null && typeof value === "object") for (const item of Object.values(value)) walk(item, depth + 1);
|
|
29876
30015
|
};
|
|
30016
|
+
walk(properties, 0);
|
|
30017
|
+
return [...found];
|
|
29877
30018
|
}
|
|
29878
|
-
|
|
29879
|
-
|
|
29880
|
-
|
|
29881
|
-
|
|
29882
|
-
|
|
29883
|
-
|
|
29884
|
-
|
|
29885
|
-
|
|
29886
|
-
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
30019
|
+
|
|
30020
|
+
// src/provisioning/providers/custom-resource/retry-policy.ts
|
|
30021
|
+
const CR_TRANSIENT_AUTHZ_SIGNALS = [
|
|
30022
|
+
"not authorized to perform",
|
|
30023
|
+
"no identity-based policy allows",
|
|
30024
|
+
"is not in the state functionactive",
|
|
30025
|
+
"not in the state functionactive",
|
|
30026
|
+
"cannot be assumed",
|
|
30027
|
+
"is unable to assume"
|
|
30028
|
+
];
|
|
30029
|
+
const CR_THROWN_AUTHZ_EXTRA_SIGNALS = ["no identity-based policy allows", "not in the state functionactive"];
|
|
30030
|
+
const CR_TRANSIENT_AUTHZ_LOG_SIGNALS = [
|
|
30031
|
+
...CR_TRANSIENT_AUTHZ_SIGNALS,
|
|
30032
|
+
"an error occurred (403)",
|
|
30033
|
+
"accessdenied",
|
|
30034
|
+
"access denied"
|
|
30035
|
+
];
|
|
30036
|
+
const CR_LOG_TAIL_WARN_MAX_CHARS = 2e3;
|
|
30037
|
+
const CR_RECYCLE_DESCRIPTION_PREFIX = "cdkd: recycled for IAM-propagation retry (";
|
|
30038
|
+
function recycleFunctionKey(serviceToken) {
|
|
30039
|
+
if (!LAMBDA_FUNCTION_ARN.test(serviceToken)) return serviceToken;
|
|
30040
|
+
return serviceToken.split(":").slice(0, 7).join(":");
|
|
29893
30041
|
}
|
|
29894
|
-
|
|
29895
|
-
|
|
30042
|
+
const customResourceRetryDelays = { sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)) };
|
|
30043
|
+
const DELETE_ACCOUNT_LOOKUP_RETRY_DELAYS_MS = [
|
|
30044
|
+
2e3,
|
|
30045
|
+
5e3,
|
|
30046
|
+
1e4
|
|
30047
|
+
];
|
|
30048
|
+
const CR_LOG_TAIL_BOILERPLATE = /^(START|END|REPORT|XRAY|INIT_START|INIT_REPORT|RESTORE_START|RESTORE_REPORT|EXTENSION) /;
|
|
30049
|
+
const SNS_SERVICE_TOKEN_ARN_RE = /^arn:aws[a-z0-9-]*:sns:/;
|
|
30050
|
+
|
|
30051
|
+
// src/provisioning/providers/custom-resource/delete-skip-reasons.ts
|
|
30052
|
+
function deletePathMasker(callerMask, noEchoMask) {
|
|
30053
|
+
if (callerMask === void 0) return noEchoMask;
|
|
30054
|
+
if (noEchoMask === void 0) return callerMask;
|
|
30055
|
+
return (text) => callerMask(noEchoMask(text));
|
|
29896
30056
|
}
|
|
29897
|
-
|
|
29898
|
-
|
|
29899
|
-
|
|
30057
|
+
const CR_NO_PROPERTIES_SKIP_REASON = "no properties in state — Delete handler not invoked";
|
|
30058
|
+
const CR_NO_SERVICE_TOKEN_SKIP_REASON = "no ServiceToken in state — Delete handler not invoked";
|
|
30059
|
+
const CR_MASKED_SERVICE_TOKEN_SKIP_REASON = "masked ServiceToken in state — Delete handler not invoked";
|
|
30060
|
+
const CR_NOECHO_PROPERTIES_SKIP_REASON = "NoEcho mask in recorded properties — Delete handler not invoked";
|
|
30061
|
+
const CR_MASKED_PROPERTIES_SKIP_REASON = "redaction mask in properties — Delete handler not invoked";
|
|
30062
|
+
const NOECHO_RERESOLUTION_BOUND = "cdkd re-resolves such a coordinate only where it holds the template ('cdkd destroy' with the app, or 'cdkd deploy --recreate-via-cc-api' naming this resource), and only while today's template reads a NoEcho parameter there with the property's text and inputs unchanged; an attribute a producer declared NoEcho has no template value to re-resolve.";
|
|
30063
|
+
function noEchoPropertiesRemedy(context, logicalId) {
|
|
30064
|
+
return context?.stackDestroy === true ? `cdkd is KEEPING the state record and the run exits non-zero, and every re-run skips it again. Tear down what the handler manages by hand, then drop the record with ${stateOrphanRecordRemedy(context, logicalId)}.` : "This delete is not part of a stack destroy (a 'cdkd deploy' template removal, replacement or rollback, or a 'cdkd rollback'). For a resource removed from the template the record is KEPT and every 'cdkd deploy' skips it again: tear down what the handler manages by hand. " + crDeploySkipTail(logicalId);
|
|
29900
30065
|
}
|
|
29901
|
-
const
|
|
29902
|
-
|
|
29903
|
-
|
|
29904
|
-
|
|
29905
|
-
|
|
29906
|
-
|
|
29907
|
-
const owner = await expectedOwnerParam(s3);
|
|
29908
|
-
const outcome = await applyCustomResourceResponseExpiration(s3, bucket, { ...owner.ExpectedBucketOwner && { expectedBucketOwner: owner.ExpectedBucketOwner } });
|
|
29909
|
-
if (outcome.status === "failed" || outcome.status === "refused") log.warn(customResourceResponseExpirationWarning(bucket, outcome));
|
|
29910
|
-
else if (outcome.status === "added") log.debug(`Added the ${1}-day expiration lifecycle rule for ${CUSTOM_RESOURCE_RESPONSE_PREFIX}/ to the state bucket.`);
|
|
29911
|
-
} catch (error) {
|
|
29912
|
-
log.warn(customResourceResponseExpirationWarning(bucket, failedOutcome("lifecycle check", error)));
|
|
29913
|
-
}
|
|
29914
|
-
})();
|
|
29915
|
-
ensured.set(bucket, run);
|
|
29916
|
-
return run;
|
|
30066
|
+
const CR_REFERENCE_SERVICE_TOKEN_SKIP_REASON = "dynamic reference as ServiceToken in state — handler not invoked";
|
|
30067
|
+
const CR_DELETE_INVOKE_FAILED_SKIP_REASON = "Delete request to the handler did not complete — resource unproven";
|
|
30068
|
+
const CR_DELETE_HANDLER_FAILED_SKIP_REASON = "Delete handler reported FAILED — resource unproven";
|
|
30069
|
+
const CR_BACKING_LAMBDA_GONE_SKIP_REASON = "backing Lambda function is gone — Delete handler not invoked";
|
|
30070
|
+
function crSkipNotARetryCaveat(context, logicalId) {
|
|
30071
|
+
return `NOTE this record is a POINTER, not a retry: the same destroy run deletes the backing Lambda, so the next 'cdkd destroy' cannot reach the handler either: it skips this resource again and keeps the record (issue 2115). Tear the resource down by hand, then drop the record with ${stateOrphanRecordRemedy(context, logicalId)}.`;
|
|
29917
30072
|
}
|
|
29918
|
-
|
|
29919
|
-
|
|
29920
|
-
|
|
29921
|
-
const boundSecretBagsStore = new AsyncLocalStorage();
|
|
29922
|
-
installLogLineMaskerSource(() => {
|
|
29923
|
-
const bags = boundSecretBagsStore.getStore();
|
|
29924
|
-
if (bags === void 0 || !bags.some((bag) => hasMaskableValues(bag))) return void 0;
|
|
29925
|
-
return createUnionSecretMasker(bags);
|
|
29926
|
-
});
|
|
29927
|
-
function withCurrentResourceSecrets(secrets, fn) {
|
|
29928
|
-
const outer = boundSecretBagsStore.getStore() ?? [];
|
|
29929
|
-
return boundSecretBagsStore.run([...outer, secrets], () => currentResourceSecretsStore.run(secrets, fn));
|
|
30073
|
+
const DEPLOY_SKIP_CAVEAT = "NOTE this arm is ALSO reached from cdkd deploy. Since issue 1762 the DELETE of a resource removed from the template behaves like destroy — the record is KEPT and the next deploy re-attempts it — but a REPLACEMENT / rollback delete FAILS the resource instead (https://github.com/go-to-k/cdkd/issues/1762), leaving the old one untracked; there, tear the resource down by hand.";
|
|
30074
|
+
function crDeployNoStateOrphan(logicalId) {
|
|
30075
|
+
return `For a resource removed from the template, to give up on the delete and stop tracking it, drop the record with ${stateOrphanRecordRemedy(void 0, logicalId)}.`;
|
|
29930
30076
|
}
|
|
29931
|
-
function
|
|
29932
|
-
|
|
29933
|
-
return boundSecretBagsStore.run([...outer, secrets], fn);
|
|
30077
|
+
function crDeploySkipTail(logicalId) {
|
|
30078
|
+
return "Meanwhile 'cdkd deploy --allow-unaddressed' exits 0 (a deploy-only flag; 'cdkd rollback' has none); the record stays and each deploy re-attempts the delete. A delete-first REPLACEMENT or a rollback delete usually FAILS the resource and keeps the record (https://github.com/go-to-k/cdkd/issues/1762). Where the other copy already exists (a replacement that created the new resource first, or a rollback that re-created the old one first), the skip only warns and the surviving copy is no longer tracked, so tear it down by hand. " + crDeployNoStateOrphan(logicalId);
|
|
29934
30079
|
}
|
|
29935
|
-
|
|
29936
|
-
|
|
30080
|
+
const CR_DEPLOY_HANDLER_SKIP_HEAD = "This delete is not part of a stack destroy (a 'cdkd deploy' template removal, replacement or rollback, or a 'cdkd rollback'). For a resource removed from the template the record is KEPT and the next 'cdkd deploy' re-sends the Delete: fix what made it fail (the handler's Delete logic, or what stopped the invoke) and re-deploy. That reaches the handler only while its function exists: if this deploy also deleted the backing Lambda, the next deploy finds it gone and DROPS the record with a warning, so tear down what the handler manages by hand. ";
|
|
30081
|
+
const CR_DEPLOY_UNADDRESSABLE_HEAD = "This delete is not part of a stack destroy (a 'cdkd deploy' template removal, replacement or rollback, or a 'cdkd rollback'). For a resource removed from the template the record is KEPT and every 'cdkd deploy' skips it again until ServiceToken is restored: put the provider's Lambda function or SNS topic ARN back in state.json and re-deploy, which sends the Delete while that handler exists. If its Lambda function is gone, that deploy DROPS the record with a warning instead, so tear down what the handler manages by hand. ";
|
|
30082
|
+
function crDestroyUnaddressableRemedy(context, logicalId) {
|
|
30083
|
+
return `Tear the resource down by hand, then drop the record with ${stateOrphanRecordRemedy(context, logicalId)}. Restoring ServiceToken (the provider's Lambda function or SNS topic ARN) in state.json and re-running helps only while that handler still exists: a destroy goes on to delete its backing Lambda.`;
|
|
29937
30084
|
}
|
|
29938
|
-
|
|
29939
|
-
|
|
29940
|
-
function isCustomResourceType(resourceType) {
|
|
29941
|
-
return resourceType === "AWS::CloudFormation::CustomResource" || resourceType.startsWith("Custom::");
|
|
30085
|
+
function handlerSkipRemedy(context, logicalId) {
|
|
30086
|
+
return context?.stackDestroy === true ? ` — cdkd is KEEPING the state record and the run exits non-zero. ${crSkipNotARetryCaveat(context, logicalId)}` : `. ${CR_DEPLOY_HANDLER_SKIP_HEAD}${crDeploySkipTail(logicalId)}`;
|
|
29942
30087
|
}
|
|
29943
|
-
|
|
29944
|
-
|
|
29945
|
-
"{{resolve:secretsmanager:",
|
|
29946
|
-
"{{resolve:ssm-secure:",
|
|
29947
|
-
"{{resolve:${"
|
|
29948
|
-
];
|
|
29949
|
-
function referenceService(token) {
|
|
29950
|
-
return token.slice(10).split(":")[0] ?? "";
|
|
30088
|
+
function crUnresolvedTokenUpdateRemedy() {
|
|
30089
|
+
return "This indicates an unresolved value in the template, or, on a rollback, in the resource's recorded state. Check that the template resolves ServiceToken to the provider's Lambda function or SNS topic ARN and re-deploy; a rollback replays the recorded value, so restore the template and re-deploy instead. Do not drop this record with 'cdkd state orphan', with or without --resource: the template still declares the resource, so the next deploy would send the handler a fresh Create and leave what it already manages untracked.";
|
|
29951
30090
|
}
|
|
29952
|
-
function
|
|
29953
|
-
|
|
29954
|
-
|
|
29955
|
-
const onPath = /* @__PURE__ */ new Set();
|
|
29956
|
-
const walk = (node, path, inIntrinsic) => {
|
|
29957
|
-
if (typeof node === "string") {
|
|
29958
|
-
if (dynamicReferenceTokens(node).some((t) => SECURE_REFERENCE_SERVICES.has(referenceService(t))) || inIntrinsic && SECURE_REFERENCE_OPENERS.some((opener) => node.includes(opener))) paths.push(path === "" ? "(Properties)" : path);
|
|
29959
|
-
return;
|
|
29960
|
-
}
|
|
29961
|
-
if (node === null || typeof node !== "object" || onPath.has(node)) return;
|
|
29962
|
-
onPath.add(node);
|
|
29963
|
-
if (Array.isArray(node)) node.forEach((item, i) => walk(item, inIntrinsic ? path : `${path}[${i}]`, inIntrinsic));
|
|
29964
|
-
else for (const [key, child] of Object.entries(node)) if (key.startsWith("Fn::") || key === "Ref") walk(child, path, true);
|
|
29965
|
-
else walk(child, inIntrinsic ? path : path ? `${path}.${key}` : key, inIntrinsic);
|
|
29966
|
-
onPath.delete(node);
|
|
29967
|
-
};
|
|
29968
|
-
walk(properties, "", false);
|
|
29969
|
-
return [...new Set(paths)];
|
|
30091
|
+
const CR_UNRESOLVED_TOKEN_CREATE_REMEDY = "This indicates an unresolved value in the template, or, on a rollback, in the resource's recorded state. Check that the template resolves ServiceToken to the provider's Lambda function or SNS topic ARN; a rollback replays the recorded value, so restore the template and re-deploy instead.";
|
|
30092
|
+
function unresolvedTokenDeleteRemedy(context, logicalId) {
|
|
30093
|
+
return context?.stackDestroy === true ? `re-run 'cdkd import', or drop the record with ${stateOrphanRecordRemedy(context, logicalId)}, to recover.` : `put the provider's Lambda function or SNS topic ARN back as ServiceToken in state.json and re-run to recover. ${crDeployNoStateOrphan(logicalId)}`;
|
|
29970
30094
|
}
|
|
29971
|
-
function
|
|
29972
|
-
return
|
|
30095
|
+
function unaddressableServiceTokenRemedy(context, logicalId) {
|
|
30096
|
+
return context?.stackDestroy === true ? crDestroyUnaddressableRemedy(context, logicalId) : `${CR_DEPLOY_UNADDRESSABLE_HEAD}${crDeploySkipTail(logicalId)}`;
|
|
29973
30097
|
}
|
|
29974
|
-
|
|
29975
|
-
|
|
29976
|
-
|
|
29977
|
-
return
|
|
30098
|
+
|
|
30099
|
+
// src/provisioning/providers/custom-resource/response-body.ts
|
|
30100
|
+
function syntheticStackId(logicalId, accountInfo) {
|
|
30101
|
+
return `arn:${accountInfo.partition}:cloudformation:${accountInfo.region}:${accountInfo.accountId}:stack/cdkd-${logicalId}/cdkd`;
|
|
29978
30102
|
}
|
|
29979
|
-
function
|
|
29980
|
-
|
|
29981
|
-
|
|
29982
|
-
|
|
29983
|
-
|
|
29984
|
-
|
|
29985
|
-
|
|
29986
|
-
|
|
30103
|
+
function hasHandlerLogOutput(logTail) {
|
|
30104
|
+
return logTail.split("\n").some((line) => line.trim().length > 0 && !CR_LOG_TAIL_BOILERPLATE.test(line.trimStart()));
|
|
30105
|
+
}
|
|
30106
|
+
function parseCfnResponseBody(body) {
|
|
30107
|
+
let value;
|
|
30108
|
+
try {
|
|
30109
|
+
value = JSON.parse(body);
|
|
30110
|
+
} catch {
|
|
30111
|
+
return { kind: "unparseable" };
|
|
30112
|
+
}
|
|
30113
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return { kind: "non-object" };
|
|
30114
|
+
return {
|
|
30115
|
+
kind: "envelope",
|
|
30116
|
+
response: value
|
|
30117
|
+
};
|
|
30118
|
+
}
|
|
30119
|
+
function capForLog(value) {
|
|
30120
|
+
const safe = displaySafe(value);
|
|
30121
|
+
const capped = safe.length > 200 ? `${safe.slice(0, 200)}...(${safe.length} chars)` : safe;
|
|
30122
|
+
return JSON.stringify(capped);
|
|
30123
|
+
}
|
|
30124
|
+
const DESCRIBE_MAX_FIELD_CHARS = 200;
|
|
30125
|
+
const DESCRIBE_MAX_LINE_CHARS = 1e3;
|
|
30126
|
+
const DESCRIBE_MAX_DATA_KEYS = 20;
|
|
30127
|
+
function describeCfnResponseBody(body, parsed) {
|
|
30128
|
+
if (parsed.kind !== "envelope") return `${parsed.kind === "unparseable" ? "unparseable body" : "JSON body is not an object"} (${body.length} chars)`;
|
|
30129
|
+
const envelope = parsed.response;
|
|
30130
|
+
const status = typeof envelope["Status"] === "string" ? envelope["Status"] : "<absent>";
|
|
30131
|
+
const physicalId = typeof envelope["PhysicalResourceId"] === "string" ? envelope["PhysicalResourceId"] : "<absent>";
|
|
30132
|
+
const data = envelope["Data"];
|
|
30133
|
+
let dataPart;
|
|
30134
|
+
if (data === void 0) dataPart = "Data absent";
|
|
30135
|
+
else if (typeof data === "object" && data !== null && !Array.isArray(data)) {
|
|
30136
|
+
const keys = Object.keys(data);
|
|
30137
|
+
const shown = keys.slice(0, 20).map((k) => capForLog(k));
|
|
30138
|
+
const omitted = keys.length - shown.length;
|
|
30139
|
+
dataPart = `Data keys [${shown.join(", ")}${omitted > 0 ? `, +${omitted} more` : ""}]`;
|
|
30140
|
+
} else dataPart = "Data not an object";
|
|
30141
|
+
const line = `Status=${capForLog(status)} PhysicalResourceId=${capForLog(physicalId)} ${dataPart}`;
|
|
30142
|
+
return line.length > 1e3 ? `${line.slice(0, DESCRIBE_MAX_LINE_CHARS)}...(${line.length} chars total)` : line;
|
|
30143
|
+
}
|
|
30144
|
+
function respondedPhysicalId(response) {
|
|
30145
|
+
return hasAddressablePhysicalId({ physicalId: response.PhysicalResourceId }) ? response.PhysicalResourceId : void 0;
|
|
30146
|
+
}
|
|
30147
|
+
|
|
30148
|
+
// src/provisioning/providers/custom-resource/create-update.ts
|
|
30149
|
+
function getMinResourceTimeoutMs$1() {
|
|
30150
|
+
return this.asyncResponseTimeoutMs;
|
|
30151
|
+
}
|
|
30152
|
+
function setResponseBucket(bucket) {
|
|
30153
|
+
this.responseBucket = bucket;
|
|
30154
|
+
this.responseClientGeneration++;
|
|
30155
|
+
this.responseClientResolved = false;
|
|
30156
|
+
this.responseClientResolveInFlight = null;
|
|
30157
|
+
}
|
|
30158
|
+
function replaceS3Client(replacement) {
|
|
30159
|
+
if (this.ownsS3Client) this.s3Client.destroy?.();
|
|
30160
|
+
this.s3Client = replacement;
|
|
30161
|
+
this.ownsS3Client = true;
|
|
30162
|
+
}
|
|
30163
|
+
async function ensureResponseClient() {
|
|
30164
|
+
if (this.responseClientResolved || !this.responseBucket) return;
|
|
30165
|
+
if (this.responseClientResolveInFlight) return this.responseClientResolveInFlight;
|
|
30166
|
+
const bucket = this.responseBucket;
|
|
30167
|
+
const generation = this.responseClientGeneration;
|
|
30168
|
+
this.responseClientResolveInFlight = (async () => {
|
|
30169
|
+
try {
|
|
30170
|
+
const replacement = await rebuildClientForBucketRegion(this.s3Client, bucket, {
|
|
30171
|
+
reuseClientCredentials: true,
|
|
30172
|
+
tolerateNonStandardClient: true,
|
|
30173
|
+
onRebuild: ({ bucketRegion, currentRegion }) => {
|
|
30174
|
+
this.logger.debug(`Custom resource response bucket ${displayIdent(bucket)} is in ${displayIdent(bucketRegion)} (client was ${displayIdent(currentRegion)}); building a region-corrected S3 client for response operations.`);
|
|
30175
|
+
}
|
|
30176
|
+
});
|
|
30177
|
+
if (generation !== this.responseClientGeneration) {
|
|
30178
|
+
replacement?.destroy?.();
|
|
30179
|
+
return;
|
|
30180
|
+
}
|
|
30181
|
+
if (replacement) this.replaceS3Client(replacement);
|
|
30182
|
+
this.responseClientResolved = true;
|
|
30183
|
+
} finally {
|
|
30184
|
+
if (generation === this.responseClientGeneration) this.responseClientResolveInFlight = null;
|
|
30185
|
+
}
|
|
30186
|
+
})();
|
|
30187
|
+
return this.responseClientResolveInFlight;
|
|
30188
|
+
}
|
|
30189
|
+
async function resolveSyntheticStackId(logicalId, operation, watch) {
|
|
30190
|
+
const retryDelays = operation === "Delete" ? DELETE_ACCOUNT_LOOKUP_RETRY_DELAYS_MS : [];
|
|
30191
|
+
for (let attempt = 0;; attempt++) try {
|
|
30192
|
+
return syntheticStackId(logicalId, await getAccountInfo(this.configuredRegion));
|
|
30193
|
+
} catch (error) {
|
|
30194
|
+
const delayMs = retryDelays[attempt];
|
|
30195
|
+
if (!(error instanceof AccountIdUnavailableError) || delayMs === void 0) throw error;
|
|
30196
|
+
this.logger.warn(`Custom resource ${logicalId}: the Delete request cannot be sent until the account is known: ${error.message} Asking again in ${delayMs / 1e3}s (attempt ${attempt + 1}/${retryDelays.length + 1}).`);
|
|
30197
|
+
await this.sleepInterruptibly(delayMs, watch);
|
|
30198
|
+
}
|
|
30199
|
+
}
|
|
30200
|
+
function wrapCaughtError(mask, error, build) {
|
|
30201
|
+
const failure = describeAwsFailure(error);
|
|
30202
|
+
if (!failure.redacted) return build(failure.detail);
|
|
30203
|
+
this.logger.debug(maskerOrIdentity(mask)(build(failure.detail).message));
|
|
30204
|
+
const wrapped = build(failure.summary);
|
|
30205
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
30206
|
+
}
|
|
30207
|
+
async function create$1(logicalId, resourceType, properties, context) {
|
|
30208
|
+
this.logger.debug(`Creating custom resource ${logicalId} (${resourceType})`);
|
|
30209
|
+
const serviceToken = properties["ServiceToken"];
|
|
30210
|
+
if (!serviceToken) throw new ProvisioningError(`ServiceToken is required for custom resource ${logicalId}`, resourceType, logicalId);
|
|
30211
|
+
if (typeof serviceToken !== "string") throw new ProvisioningError(`Custom Resource ${logicalId}: ServiceToken is not a resolved string ARN (got ${typeof serviceToken}). ` + CR_UNRESOLVED_TOKEN_CREATE_REMEDY, resourceType, logicalId);
|
|
30212
|
+
this.refuseResolvedSecret(logicalId, resourceType, properties);
|
|
30213
|
+
try {
|
|
30214
|
+
const cfnResponse = await this.invokeCustomResourceWithRetry(serviceToken, logicalId, "Create", (invocation) => ({
|
|
30215
|
+
RequestType: "Create",
|
|
30216
|
+
RequestId: invocation.requestId,
|
|
30217
|
+
ResponseURL: invocation.responseURL,
|
|
30218
|
+
ResourceType: resourceType,
|
|
30219
|
+
LogicalResourceId: logicalId,
|
|
30220
|
+
StackId: invocation.stackId,
|
|
30221
|
+
ResourceProperties: this.stringifyProperties(properties)
|
|
30222
|
+
}), maskerOrIdentity(context?.maskSecrets), { properties });
|
|
30223
|
+
if (cfnResponse.Status === "FAILED") throw new Error(`Custom resource handler returned FAILED: ${cfnResponse.Reason || "Unknown reason"}`);
|
|
30224
|
+
const physicalId = respondedPhysicalId(cfnResponse) ?? logicalId;
|
|
30225
|
+
const attributes = cfnResponse.Data || {};
|
|
30226
|
+
this.logger.debug(`Successfully created custom resource ${logicalId}: ${physicalId}`);
|
|
30227
|
+
return {
|
|
30228
|
+
physicalId,
|
|
30229
|
+
attributes,
|
|
30230
|
+
...cfnResponse.NoEcho === true && { noEchoAttributes: true }
|
|
30231
|
+
};
|
|
30232
|
+
} catch (error) {
|
|
30233
|
+
markAuxiliaryFailure(error, logicalId);
|
|
30234
|
+
const cause = error instanceof Error ? error : void 0;
|
|
30235
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create custom resource ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
30236
|
+
}
|
|
30237
|
+
}
|
|
30238
|
+
async function update$1(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
30239
|
+
this.logger.debug(`Updating custom resource ${logicalId}: ${physicalId} (${resourceType})`);
|
|
30240
|
+
const serviceToken = properties["ServiceToken"];
|
|
30241
|
+
if (!serviceToken) throw new ProvisioningError(`ServiceToken is required for custom resource ${logicalId}`, resourceType, logicalId, physicalId);
|
|
30242
|
+
if (typeof serviceToken !== "string") throw new ProvisioningError(`Custom Resource ${logicalId}: ServiceToken is not a resolved string ARN (got ${typeof serviceToken}). ` + crUnresolvedTokenUpdateRemedy(), resourceType, logicalId, physicalId);
|
|
30243
|
+
this.refuseResolvedSecret(logicalId, resourceType, properties, physicalId, previousProperties);
|
|
30244
|
+
try {
|
|
30245
|
+
const cfnResponse = await this.invokeCustomResourceWithRetry(serviceToken, logicalId, "Update", (invocation) => ({
|
|
30246
|
+
RequestType: "Update",
|
|
30247
|
+
RequestId: invocation.requestId,
|
|
30248
|
+
ResponseURL: invocation.responseURL,
|
|
30249
|
+
ResourceType: resourceType,
|
|
30250
|
+
LogicalResourceId: logicalId,
|
|
30251
|
+
PhysicalResourceId: physicalId,
|
|
30252
|
+
StackId: invocation.stackId,
|
|
30253
|
+
ResourceProperties: this.stringifyProperties(properties),
|
|
30254
|
+
OldResourceProperties: this.stringifyProperties(previousProperties)
|
|
30255
|
+
}), maskerOrIdentity(context?.maskSecrets), {
|
|
30256
|
+
properties,
|
|
30257
|
+
previousProperties
|
|
30258
|
+
});
|
|
30259
|
+
if (cfnResponse.Status === "FAILED") throw new Error(`Custom resource handler returned FAILED: ${cfnResponse.Reason || "Unknown reason"}`);
|
|
30260
|
+
const newPhysicalId = respondedPhysicalId(cfnResponse) ?? physicalId;
|
|
30261
|
+
const wasReplaced = newPhysicalId !== physicalId;
|
|
30262
|
+
const attributes = cfnResponse.Data || {};
|
|
30263
|
+
this.logger.debug(`Successfully updated custom resource ${logicalId}: ${newPhysicalId}${wasReplaced ? " (replaced)" : ""}`);
|
|
30264
|
+
return {
|
|
30265
|
+
physicalId: newPhysicalId,
|
|
30266
|
+
wasReplaced,
|
|
30267
|
+
attributes,
|
|
30268
|
+
...cfnResponse.NoEcho === true && { noEchoAttributes: true }
|
|
30269
|
+
};
|
|
30270
|
+
} catch (error) {
|
|
30271
|
+
const cause = error instanceof Error ? error : void 0;
|
|
30272
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update custom resource ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
30273
|
+
}
|
|
30274
|
+
}
|
|
30275
|
+
|
|
30276
|
+
// src/deployment/resource-secrets-scope.ts
|
|
30277
|
+
const currentResourceSecretsStore = new AsyncLocalStorage();
|
|
30278
|
+
const boundSecretBagsStore = new AsyncLocalStorage();
|
|
30279
|
+
installLogLineMaskerSource(() => {
|
|
30280
|
+
const bags = boundSecretBagsStore.getStore();
|
|
30281
|
+
if (bags === void 0 || !bags.some((bag) => hasMaskableValues(bag))) return void 0;
|
|
30282
|
+
return createUnionSecretMasker(bags);
|
|
30283
|
+
});
|
|
30284
|
+
function withCurrentResourceSecrets(secrets, fn) {
|
|
30285
|
+
const outer = boundSecretBagsStore.getStore() ?? [];
|
|
30286
|
+
return boundSecretBagsStore.run([...outer, secrets], () => currentResourceSecretsStore.run(secrets, fn));
|
|
30287
|
+
}
|
|
30288
|
+
function withPrintingSecrets(secrets, fn) {
|
|
30289
|
+
const outer = boundSecretBagsStore.getStore() ?? [];
|
|
30290
|
+
return boundSecretBagsStore.run([...outer, secrets], fn);
|
|
30291
|
+
}
|
|
30292
|
+
function getCurrentResourceSecrets() {
|
|
30293
|
+
return currentResourceSecretsStore.getStore();
|
|
30294
|
+
}
|
|
30295
|
+
|
|
30296
|
+
// src/provisioning/custom-resource-secure-references.ts
|
|
30297
|
+
function isCustomResourceType(resourceType) {
|
|
30298
|
+
return resourceType === "AWS::CloudFormation::CustomResource" || resourceType.startsWith("Custom::");
|
|
30299
|
+
}
|
|
30300
|
+
const SECURE_REFERENCE_SERVICES = /* @__PURE__ */ new Set(["secretsmanager", "ssm-secure"]);
|
|
30301
|
+
const SECURE_REFERENCE_OPENERS = [
|
|
30302
|
+
"{{resolve:secretsmanager:",
|
|
30303
|
+
"{{resolve:ssm-secure:",
|
|
30304
|
+
"{{resolve:${"
|
|
30305
|
+
];
|
|
30306
|
+
function referenceService(token) {
|
|
30307
|
+
return token.slice(10).split(":")[0] ?? "";
|
|
30308
|
+
}
|
|
30309
|
+
function findSecureReferencePaths(resourceType, properties) {
|
|
30310
|
+
if (!isCustomResourceType(resourceType) || properties == null) return [];
|
|
30311
|
+
const paths = [];
|
|
30312
|
+
const onPath = /* @__PURE__ */ new Set();
|
|
30313
|
+
const walk = (node, path, inIntrinsic) => {
|
|
30314
|
+
if (typeof node === "string") {
|
|
30315
|
+
if (dynamicReferenceTokens(node).some((t) => SECURE_REFERENCE_SERVICES.has(referenceService(t))) || inIntrinsic && SECURE_REFERENCE_OPENERS.some((opener) => node.includes(opener))) paths.push(path === "" ? "(Properties)" : path);
|
|
30316
|
+
return;
|
|
30317
|
+
}
|
|
30318
|
+
if (node === null || typeof node !== "object" || onPath.has(node)) return;
|
|
30319
|
+
onPath.add(node);
|
|
30320
|
+
if (Array.isArray(node)) node.forEach((item, i) => walk(item, inIntrinsic ? path : `${path}[${i}]`, inIntrinsic));
|
|
30321
|
+
else for (const [key, child] of Object.entries(node)) if (key.startsWith("Fn::") || key === "Ref") walk(child, path, true);
|
|
30322
|
+
else walk(child, inIntrinsic ? path : path ? `${path}.${key}` : key, inIntrinsic);
|
|
30323
|
+
onPath.delete(node);
|
|
30324
|
+
};
|
|
30325
|
+
walk(properties, "", false);
|
|
30326
|
+
return [...new Set(paths)];
|
|
30327
|
+
}
|
|
30328
|
+
function buildSecureReferenceMessage(logicalId, paths) {
|
|
30329
|
+
return ` - ${logicalId}: ${paths.join(", ")}`;
|
|
30330
|
+
}
|
|
30331
|
+
function carriesResolvedSecret(secrets) {
|
|
30332
|
+
if (secrets === void 0) return false;
|
|
30333
|
+
for (const [plaintext, expression] of secrets) if (expression !== "***" && plaintext.length > 0) return true;
|
|
30334
|
+
return false;
|
|
30335
|
+
}
|
|
30336
|
+
function findResolvedSecretPaths(properties, secrets) {
|
|
30337
|
+
if (properties == null || secrets === void 0 || secrets.size === 0) return [];
|
|
30338
|
+
const plaintexts = [...secrets.entries()].filter(([plaintext, expression]) => expression !== "***" && plaintext.length > 0).map(([plaintext]) => plaintext);
|
|
30339
|
+
if (plaintexts.length === 0) return [];
|
|
30340
|
+
const carries = (leaf) => plaintexts.some((plaintext) => leaf === plaintext || plaintext.length >= 4 && leaf.includes(plaintext));
|
|
30341
|
+
const paths = [];
|
|
30342
|
+
const onPath = /* @__PURE__ */ new Set();
|
|
30343
|
+
const walk = (node, path) => {
|
|
29987
30344
|
if (typeof node === "string") {
|
|
29988
30345
|
if (carries(node)) paths.push(path);
|
|
29989
30346
|
return;
|
|
@@ -30326,397 +30683,764 @@ var TemplateNoEchoReresolver = class TemplateNoEchoReresolver {
|
|
|
30326
30683
|
}
|
|
30327
30684
|
};
|
|
30328
30685
|
|
|
30329
|
-
// src/provisioning/providers/custom-resource
|
|
30330
|
-
function
|
|
30331
|
-
|
|
30332
|
-
if (
|
|
30333
|
-
|
|
30334
|
-
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
|
|
30339
|
-
const
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30686
|
+
// src/provisioning/providers/custom-resource/delete.ts
|
|
30687
|
+
async function deleteImpl(logicalId, physicalId, resourceType, properties, context) {
|
|
30688
|
+
this.logger.debug(`Deleting custom resource ${logicalId}: ${physicalId} (${resourceType})`);
|
|
30689
|
+
if (!properties) {
|
|
30690
|
+
this.logger.warn(`No properties available for custom resource ${logicalId}, skipping deletion — the handler is never invoked, so anything this custom resource manages is LEFT IN PLACE. Restore the record's properties in state.json and re-run, or tear the resource down by hand. ${DEPLOY_SKIP_CAVEAT}`);
|
|
30691
|
+
return {
|
|
30692
|
+
outcome: "skipped",
|
|
30693
|
+
reason: CR_NO_PROPERTIES_SKIP_REASON
|
|
30694
|
+
};
|
|
30695
|
+
}
|
|
30696
|
+
const serviceToken = properties["ServiceToken"];
|
|
30697
|
+
if (!serviceToken) {
|
|
30698
|
+
this.logger.warn(`No ServiceToken found for custom resource ${logicalId}, skipping deletion — there is no handler to send the Delete request to, so anything this custom resource manages is LEFT IN PLACE. Restore ServiceToken in state.json and re-run, or tear the resource down by hand. ${DEPLOY_SKIP_CAVEAT}`);
|
|
30699
|
+
return {
|
|
30700
|
+
outcome: "skipped",
|
|
30701
|
+
reason: CR_NO_SERVICE_TOKEN_SKIP_REASON
|
|
30702
|
+
};
|
|
30703
|
+
}
|
|
30704
|
+
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; ` + unresolvedTokenDeleteRemedy(context, logicalId), resourceType, logicalId, physicalId);
|
|
30705
|
+
if (carriesSecretMask(serviceToken)) {
|
|
30706
|
+
this.logger.warn(safeMsg`ServiceToken for custom resource ${logicalId} is recorded in state as the redaction ` + safeMsg`mask '${"***"}' (a NoEcho value this resource reads equals, or is contained ` + "in, its ServiceToken), so cdkd cannot address the handler; skipping deletion — anything this custom resource manages is LEFT IN PLACE. Re-deploying does not repair the record while that attribute still carries the value. " + safeMsg`${unaddressableServiceTokenRemedy(context, logicalId)}`);
|
|
30707
|
+
return {
|
|
30708
|
+
outcome: "skipped",
|
|
30709
|
+
reason: CR_MASKED_SERVICE_TOKEN_SKIP_REASON
|
|
30710
|
+
};
|
|
30711
|
+
}
|
|
30712
|
+
if (dynamicReferenceTokens(serviceToken).length > 0) {
|
|
30713
|
+
this.logger.warn(safeMsg`ServiceToken for custom resource ${logicalId} is recorded in state as a ` + "'{{resolve:...}}' dynamic reference, which cdkd does not resolve on delete, so it cannot address the handler; skipping deletion — anything this custom resource manages is LEFT IN PLACE. CloudFormation does not support secure (secretsmanager / ssm-secure) dynamic references in custom resources, and cdkd now refuses such a template at deploy time. " + safeMsg`${unaddressableServiceTokenRemedy(context, logicalId)}`);
|
|
30714
|
+
return {
|
|
30715
|
+
outcome: "skipped",
|
|
30716
|
+
reason: CR_REFERENCE_SERVICE_TOKEN_SKIP_REASON
|
|
30717
|
+
};
|
|
30718
|
+
}
|
|
30719
|
+
const reresolved = context?.noEchoDeleteValues;
|
|
30720
|
+
const { payload, unresolved } = applyNoEchoDeleteValues(properties, context?.recordedNoEchoLeaves, reresolved);
|
|
30721
|
+
if (unresolved.length > 0) {
|
|
30722
|
+
const maskedNoEchoPaths = unresolved.map((coordinate) => coordinate.join("."));
|
|
30723
|
+
this.logger.warn(safeMsg`Custom resource ${logicalId} is recorded in state with ${maskedNoEchoPaths.join(", ")} ` + `holding the '***' mask of a NoEcho value (a NoEcho parameter, or an attribute declared NoEcho), which cdkd does not keep, so its handler would receive the mask in ResourceProperties; skipping deletion — the handler is not invoked, so anything this custom resource manages is LEFT IN PLACE. ${NOECHO_RERESOLUTION_BOUND} ` + safeMsg`${noEchoPropertiesRemedy(context, logicalId)}`);
|
|
30724
|
+
return {
|
|
30725
|
+
outcome: "skipped",
|
|
30726
|
+
reason: CR_NOECHO_PROPERTIES_SKIP_REASON
|
|
30727
|
+
};
|
|
30728
|
+
}
|
|
30729
|
+
if (carriesSecretMask(payload)) {
|
|
30730
|
+
this.logger.warn(safeMsg`Custom resource ${logicalId} is recorded in state with a property holding the ` + "'***' redaction mask, which no NoEcho coordinate of the record names, so cdkd cannot re-resolve it and its handler would receive the mask in ResourceProperties; skipping deletion — the handler is not invoked, so anything this custom resource manages is LEFT IN PLACE. For a record 'cdkd import' or 'cdkd scrub' wrote, a 'cdkd deploy' of the app first records which positions hold a NoEcho value, after which 'cdkd destroy' sends the delete. " + safeMsg`${noEchoPropertiesRemedy(context, logicalId)}`);
|
|
30731
|
+
return {
|
|
30732
|
+
outcome: "skipped",
|
|
30733
|
+
reason: CR_MASKED_PROPERTIES_SKIP_REASON
|
|
30734
|
+
};
|
|
30735
|
+
}
|
|
30736
|
+
const deleteMask = deletePathMasker(context?.maskSecrets, payload === properties ? void 0 : reresolved?.maskSecrets);
|
|
30737
|
+
const show = (text) => deleteMask === void 0 ? text : deleteMask(text);
|
|
30738
|
+
if (!this.isSnsServiceToken(serviceToken) && await this.isBackingLambdaGone(serviceToken)) {
|
|
30739
|
+
if (context?.stackDestroy === true) {
|
|
30740
|
+
this.logger.warn(safeMsg`Backing Lambda for custom resource ${logicalId} no longer exists (${serviceToken}), so ` + "its Delete handler cannot be invoked and cdkd cannot confirm the resource was deleted; skipping deletion — anything this custom resource manages may still be LIVE. cdkd is KEEPING the state record and the run exits non-zero, as CloudFormation leaves such a stack DELETE_FAILED. A re-run skips it again unless a function with that exact ARN exists again (e.g. a shared provider stack destroyed before this one, then redeployed). Otherwise confirm by hand that whatever it manages is gone (or tear it down), then drop the record with " + safeMsg`${stateOrphanRecordRemedy(context, logicalId)}.`);
|
|
30741
|
+
return {
|
|
30742
|
+
outcome: "skipped",
|
|
30743
|
+
reason: CR_BACKING_LAMBDA_GONE_SKIP_REASON
|
|
30744
|
+
};
|
|
30745
|
+
}
|
|
30746
|
+
this.logger.warn(safeMsg`Backing Lambda for custom resource ${logicalId} no longer exists (${serviceToken}); ` + "treating the custom resource as already deleted and DROPPING its state record, as CloudFormation ignores a delete failure in an update's cleanup phase. The handler can never run again, so if its teardown was never PROVEN, whatever it manages may still be LIVE and is now untracked by cdkd. Check for leftovers by hand.");
|
|
30747
|
+
return;
|
|
30748
|
+
}
|
|
30749
|
+
try {
|
|
30750
|
+
const cfnResponse = await this.invokeCustomResourceWithRetry(serviceToken, logicalId, "Delete", (invocation) => ({
|
|
30751
|
+
RequestType: "Delete",
|
|
30752
|
+
RequestId: invocation.requestId,
|
|
30753
|
+
ResponseURL: invocation.responseURL,
|
|
30754
|
+
ResourceType: resourceType,
|
|
30755
|
+
LogicalResourceId: logicalId,
|
|
30756
|
+
PhysicalResourceId: physicalId,
|
|
30757
|
+
StackId: invocation.stackId,
|
|
30758
|
+
ResourceProperties: this.stringifyProperties(payload)
|
|
30759
|
+
}), deleteMask);
|
|
30760
|
+
if (cfnResponse.Status === "FAILED") {
|
|
30761
|
+
this.logger.warn(show(`Custom resource delete handler returned FAILED for ${logicalId}: ${cfnResponse.Reason || "Unknown reason"}. The handler reported that it did NOT delete, so anything this custom resource manages is LEFT IN PLACE${handlerSkipRemedy(context, logicalId)}`));
|
|
30762
|
+
return {
|
|
30763
|
+
outcome: "skipped",
|
|
30764
|
+
reason: CR_DELETE_HANDLER_FAILED_SKIP_REASON
|
|
30765
|
+
};
|
|
30766
|
+
}
|
|
30767
|
+
this.logger.debug(`Successfully deleted custom resource ${logicalId}`);
|
|
30768
|
+
} catch (error) {
|
|
30769
|
+
const failure = describeAwsFailure(error);
|
|
30770
|
+
this.logger.warn(show(`Failed to delete custom resource ${logicalId}, but continuing: ${asSentence(failure.summary)} The Delete handler did not complete, so anything this custom resource manages may still be LIVE${handlerSkipRemedy(context, logicalId)}`));
|
|
30771
|
+
if (failure.redacted) this.logger.debug(show(`Custom resource ${logicalId} delete failure detail: ${failure.detail}`));
|
|
30772
|
+
return {
|
|
30773
|
+
outcome: "skipped",
|
|
30774
|
+
reason: CR_DELETE_INVOKE_FAILED_SKIP_REASON
|
|
30775
|
+
};
|
|
30776
|
+
}
|
|
30343
30777
|
}
|
|
30344
|
-
|
|
30345
|
-
const
|
|
30346
|
-
|
|
30347
|
-
const
|
|
30348
|
-
|
|
30349
|
-
|
|
30778
|
+
function refuseResolvedSecret(logicalId, resourceType, properties, physicalId, previousProperties) {
|
|
30779
|
+
const secrets = getCurrentResourceSecrets();
|
|
30780
|
+
if (!carriesResolvedSecret(secrets)) return;
|
|
30781
|
+
const paths = [...findResolvedSecretPaths(properties, secrets), ...findResolvedSecretPaths(previousProperties, secrets).map((path) => `OldResourceProperties.${path}`)];
|
|
30782
|
+
const where = paths.length > 0 ? paths.join(", ") : "a property (in a form cdkd cannot point to, e.g. base64-encoded or a fragment)";
|
|
30783
|
+
throw markNonRetryable(new ProvisioningError(`Custom resource ${logicalId}: ${where} resolved to the value of a secret (a Secrets Manager secret, or an SSM SecureString parameter -- including one read through a plain {{resolve:ssm:...}} reference or a nested stack parameter). CloudFormation does not support secure dynamic references in custom resources, so cdkd does not send the secret's value to the handler. Pass the secret's name or ARN instead and have the handler read it.`, resourceType, logicalId, physicalId));
|
|
30350
30784
|
}
|
|
30351
|
-
|
|
30352
|
-
|
|
30353
|
-
return `For a resource removed from the template, to give up on the delete and stop tracking it, drop the record with ${stateOrphanRecordRemedy(void 0, logicalId)}.`;
|
|
30785
|
+
function isSnsServiceToken(serviceToken) {
|
|
30786
|
+
return SNS_SERVICE_TOKEN_ARN_RE.test(serviceToken);
|
|
30354
30787
|
}
|
|
30355
|
-
function
|
|
30356
|
-
|
|
30788
|
+
async function isBackingLambdaGone(serviceToken) {
|
|
30789
|
+
try {
|
|
30790
|
+
await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: serviceToken }));
|
|
30791
|
+
return false;
|
|
30792
|
+
} catch (error) {
|
|
30793
|
+
if (error.name === "ResourceNotFoundException") return true;
|
|
30794
|
+
this.logger.debug(`GetFunction pre-check for ${serviceToken} failed inconclusively (${describeAwsFailure(error).detail}); proceeding with the normal delete invoke`);
|
|
30795
|
+
return false;
|
|
30796
|
+
}
|
|
30357
30797
|
}
|
|
30358
|
-
|
|
30359
|
-
|
|
30360
|
-
|
|
30361
|
-
|
|
30798
|
+
|
|
30799
|
+
// src/provisioning/providers/custom-resource-response-endpoint.ts
|
|
30800
|
+
const CR_S3_ENDPOINT_ENV = "CDKD_CR_S3_ENDPOINT_URL";
|
|
30801
|
+
function refuse(reason) {
|
|
30802
|
+
throw new CdkdError(`${CR_S3_ENDPOINT_ENV} ${reason}. Set it to an http:// or https:// endpoint (e.g. http://s3:4566) that the custom resource's Lambda can reach, or unset it.`, "INVALID_CR_S3_ENDPOINT_URL");
|
|
30362
30803
|
}
|
|
30363
|
-
function
|
|
30364
|
-
|
|
30804
|
+
function customResourceS3Endpoint(env = process.env) {
|
|
30805
|
+
const raw = env[CR_S3_ENDPOINT_ENV];
|
|
30806
|
+
if (raw === void 0 || raw === "") return void 0;
|
|
30807
|
+
const value = raw.trim();
|
|
30808
|
+
if (value === "") refuse("is set to whitespace only");
|
|
30809
|
+
let parsed;
|
|
30810
|
+
try {
|
|
30811
|
+
parsed = new URL(value);
|
|
30812
|
+
} catch {
|
|
30813
|
+
refuse("is not a URL");
|
|
30814
|
+
}
|
|
30815
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") refuse("must use http:// or https://");
|
|
30816
|
+
if (parsed.username !== "" || parsed.password !== "") refuse("must not carry user info");
|
|
30817
|
+
if (parsed.search !== "" || parsed.hash !== "") refuse("must not carry a query or fragment");
|
|
30818
|
+
return {
|
|
30819
|
+
url: value,
|
|
30820
|
+
origin: parsed.origin
|
|
30821
|
+
};
|
|
30365
30822
|
}
|
|
30366
|
-
|
|
30367
|
-
|
|
30823
|
+
const presignClients = /* @__PURE__ */ new WeakMap();
|
|
30824
|
+
function responsePresignClient(base, endpoint) {
|
|
30825
|
+
const cached = presignClients.get(base);
|
|
30826
|
+
if (cached !== void 0 && cached.url === endpoint.url) return cached.client;
|
|
30827
|
+
const client = buildPresignClient(base, endpoint);
|
|
30828
|
+
presignClients.set(base, {
|
|
30829
|
+
url: endpoint.url,
|
|
30830
|
+
client
|
|
30831
|
+
});
|
|
30832
|
+
client.catch(() => {
|
|
30833
|
+
if (presignClients.get(base)?.client === client) presignClients.delete(base);
|
|
30834
|
+
});
|
|
30835
|
+
return client;
|
|
30368
30836
|
}
|
|
30369
|
-
function
|
|
30370
|
-
|
|
30837
|
+
async function buildPresignClient(base, endpoint) {
|
|
30838
|
+
const config = base.config;
|
|
30839
|
+
const region = typeof config?.region === "function" ? await config.region() : void 0;
|
|
30840
|
+
const credentials = config?.credentials;
|
|
30841
|
+
return new S3Client({
|
|
30842
|
+
...ambientClientDefaults(),
|
|
30843
|
+
...s3ClientDefaults({ explicitEndpoint: true }),
|
|
30844
|
+
...typeof region === "string" && region !== "" && { region },
|
|
30845
|
+
...credentials !== void 0 && { credentials },
|
|
30846
|
+
endpoint: endpoint.url
|
|
30847
|
+
});
|
|
30371
30848
|
}
|
|
30372
|
-
|
|
30373
|
-
|
|
30849
|
+
|
|
30850
|
+
// src/state/state-bucket-lifecycle.ts
|
|
30851
|
+
const CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID = "cdkd-custom-resource-responses-expiration";
|
|
30852
|
+
const CUSTOM_RESOURCE_RESPONSE_EXPIRATION_DAYS = 1;
|
|
30853
|
+
const CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_PREFIX = `${CUSTOM_RESOURCE_RESPONSE_PREFIX}/cdkd-1`;
|
|
30854
|
+
function buildCustomResourceResponseLifecycleRule(legacyPrefix) {
|
|
30855
|
+
const prefix = CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_PREFIX;
|
|
30856
|
+
return {
|
|
30857
|
+
ID: CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID,
|
|
30858
|
+
Status: "Enabled",
|
|
30859
|
+
...legacyPrefix ? { Prefix: prefix } : { Filter: { Prefix: prefix } },
|
|
30860
|
+
Expiration: { Days: 1 },
|
|
30861
|
+
NoncurrentVersionExpiration: { NoncurrentDays: 1 }
|
|
30862
|
+
};
|
|
30374
30863
|
}
|
|
30375
|
-
function
|
|
30376
|
-
|
|
30377
|
-
const
|
|
30378
|
-
if ("
|
|
30379
|
-
if ("
|
|
30380
|
-
|
|
30864
|
+
async function applyCustomResourceResponseExpiration(s3, bucket, opts = {}) {
|
|
30865
|
+
const owner = opts.expectedBucketOwner ? { ExpectedBucketOwner: opts.expectedBucketOwner } : {};
|
|
30866
|
+
const first = await readLifecycle(s3, bucket, owner);
|
|
30867
|
+
if ("failed" in first) return first.failed;
|
|
30868
|
+
if (first.rules.some((rule) => rule.ID === "cdkd-custom-resource-responses-expiration")) return { status: "present" };
|
|
30869
|
+
let collision;
|
|
30870
|
+
try {
|
|
30871
|
+
collision = await findStateUnderResponsePrefix(s3, bucket, owner);
|
|
30872
|
+
} catch (error) {
|
|
30873
|
+
return failedOutcome("ListObjectsV2", error);
|
|
30381
30874
|
}
|
|
30382
|
-
return
|
|
30383
|
-
|
|
30384
|
-
|
|
30385
|
-
|
|
30386
|
-
const
|
|
30387
|
-
if (
|
|
30388
|
-
|
|
30389
|
-
|
|
30390
|
-
|
|
30391
|
-
|
|
30875
|
+
if (collision !== void 0) return {
|
|
30876
|
+
status: "refused",
|
|
30877
|
+
reason: `${CUSTOM_RESOURCE_RESPONSE_PREFIX}/${displaySafe(collision) || "<unrenderable>"} holds objects other than custom-resource responses (a stack deployed with --state-prefix ${CUSTOM_RESOURCE_RESPONSE_PREFIX}), and the rule would expire them`
|
|
30878
|
+
};
|
|
30879
|
+
const latest = await readLifecycle(s3, bucket, owner);
|
|
30880
|
+
if ("failed" in latest) return latest.failed;
|
|
30881
|
+
if (latest.rules.some((rule) => rule.ID === "cdkd-custom-resource-responses-expiration")) return { status: "present" };
|
|
30882
|
+
const existing = latest.rules;
|
|
30883
|
+
const minimumObjectSize = latest.minimumObjectSize;
|
|
30884
|
+
const legacyPrefix = existing.some((rule) => rule.Prefix !== void 0);
|
|
30885
|
+
try {
|
|
30886
|
+
await s3.send(new PutBucketLifecycleConfigurationCommand({
|
|
30887
|
+
Bucket: bucket,
|
|
30888
|
+
...owner,
|
|
30889
|
+
LifecycleConfiguration: { Rules: [...existing, buildCustomResourceResponseLifecycleRule(legacyPrefix)] },
|
|
30890
|
+
...minimumObjectSize !== void 0 && { TransitionDefaultMinimumObjectSize: minimumObjectSize }
|
|
30891
|
+
}));
|
|
30892
|
+
} catch (error) {
|
|
30893
|
+
return failedOutcome("PutBucketLifecycleConfiguration", error);
|
|
30392
30894
|
}
|
|
30393
|
-
return
|
|
30394
|
-
}
|
|
30395
|
-
function asSentence(text) {
|
|
30396
|
-
return text.endsWith(".") ? text : `${text}.`;
|
|
30895
|
+
return { status: "added" };
|
|
30397
30896
|
}
|
|
30398
|
-
function
|
|
30399
|
-
if (!logResult) return void 0;
|
|
30897
|
+
async function readLifecycle(s3, bucket, owner) {
|
|
30400
30898
|
try {
|
|
30401
|
-
const
|
|
30402
|
-
|
|
30403
|
-
|
|
30404
|
-
|
|
30899
|
+
const current = await s3.send(new GetBucketLifecycleConfigurationCommand({
|
|
30900
|
+
Bucket: bucket,
|
|
30901
|
+
...owner
|
|
30902
|
+
}));
|
|
30903
|
+
return {
|
|
30904
|
+
rules: current.Rules ?? [],
|
|
30905
|
+
minimumObjectSize: current.TransitionDefaultMinimumObjectSize
|
|
30906
|
+
};
|
|
30907
|
+
} catch (error) {
|
|
30908
|
+
if (error?.name === "NoSuchLifecycleConfiguration") return {
|
|
30909
|
+
rules: [],
|
|
30910
|
+
minimumObjectSize: void 0
|
|
30911
|
+
};
|
|
30912
|
+
return { failed: failedOutcome("GetBucketLifecycleConfiguration", error) };
|
|
30405
30913
|
}
|
|
30406
30914
|
}
|
|
30407
|
-
function
|
|
30408
|
-
const
|
|
30409
|
-
|
|
30410
|
-
|
|
30411
|
-
|
|
30412
|
-
};
|
|
30413
|
-
const fields = config;
|
|
30414
|
-
const status = [
|
|
30415
|
-
[
|
|
30416
|
-
"State",
|
|
30417
|
-
fields["State"],
|
|
30418
|
-
"shown"
|
|
30419
|
-
],
|
|
30420
|
-
[
|
|
30421
|
-
"StateReasonCode",
|
|
30422
|
-
fields["StateReasonCode"],
|
|
30423
|
-
"shown"
|
|
30424
|
-
],
|
|
30425
|
-
[
|
|
30426
|
-
"StateReason",
|
|
30427
|
-
fields["StateReason"],
|
|
30428
|
-
"withheld"
|
|
30429
|
-
],
|
|
30430
|
-
[
|
|
30431
|
-
"LastUpdateStatus",
|
|
30432
|
-
fields["LastUpdateStatus"],
|
|
30433
|
-
"shown"
|
|
30434
|
-
],
|
|
30435
|
-
[
|
|
30436
|
-
"LastUpdateStatusReasonCode",
|
|
30437
|
-
fields["LastUpdateStatusReasonCode"],
|
|
30438
|
-
"shown"
|
|
30439
|
-
],
|
|
30440
|
-
[
|
|
30441
|
-
"LastUpdateStatusReason",
|
|
30442
|
-
fields["LastUpdateStatusReason"],
|
|
30443
|
-
"withheld"
|
|
30444
|
-
]
|
|
30445
|
-
];
|
|
30446
|
-
const parts = [];
|
|
30447
|
-
const reasons = [];
|
|
30448
|
-
for (const [key, value, kind] of status) {
|
|
30449
|
-
if (typeof value !== "string" || value === "") continue;
|
|
30450
|
-
if (kind === "shown") parts.push(`${key}=${value}`);
|
|
30451
|
-
else {
|
|
30452
|
-
parts.push(`${key} withheld`);
|
|
30453
|
-
reasons.push(`${key}=${value}`);
|
|
30454
|
-
}
|
|
30455
|
-
}
|
|
30915
|
+
function isAccessDenied(error) {
|
|
30916
|
+
const e = error;
|
|
30917
|
+
return e?.name === "AccessDenied" || e?.$metadata?.httpStatusCode === 403;
|
|
30918
|
+
}
|
|
30919
|
+
function failedOutcome(operation, error) {
|
|
30456
30920
|
return {
|
|
30457
|
-
|
|
30458
|
-
|
|
30921
|
+
status: "failed",
|
|
30922
|
+
reason: failureReason(operation, error),
|
|
30923
|
+
accessDenied: isAccessDenied(error)
|
|
30459
30924
|
};
|
|
30460
30925
|
}
|
|
30461
|
-
|
|
30462
|
-
|
|
30463
|
-
|
|
30464
|
-
|
|
30465
|
-
|
|
30466
|
-
|
|
30467
|
-
|
|
30468
|
-
|
|
30469
|
-
|
|
30470
|
-
|
|
30471
|
-
|
|
30472
|
-
|
|
30473
|
-
|
|
30926
|
+
async function findStateUnderResponsePrefix(s3, bucket, owner) {
|
|
30927
|
+
let token;
|
|
30928
|
+
do {
|
|
30929
|
+
const page = await s3.send(new ListObjectsV2Command({
|
|
30930
|
+
Bucket: bucket,
|
|
30931
|
+
...owner,
|
|
30932
|
+
Prefix: CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_PREFIX,
|
|
30933
|
+
Delimiter: "/",
|
|
30934
|
+
EncodingType: "url",
|
|
30935
|
+
...token !== void 0 && { ContinuationToken: token }
|
|
30936
|
+
}));
|
|
30937
|
+
const first = decodeListingKey(page.CommonPrefixes?.find((p) => p.Prefix)?.Prefix);
|
|
30938
|
+
if (first !== void 0) return first.slice(CUSTOM_RESOURCE_RESPONSE_PREFIX.length + 1);
|
|
30939
|
+
token = page.IsTruncated ? page.NextContinuationToken : void 0;
|
|
30940
|
+
} while (token !== void 0);
|
|
30941
|
+
}
|
|
30942
|
+
function failureReason(operation, error) {
|
|
30943
|
+
return `${operation} failed: ${displaySafe(describeAwsFailure(error).detail) || "<unrenderable>"}`;
|
|
30944
|
+
}
|
|
30945
|
+
function customResourceResponseExpirationWarning(bucket, outcome) {
|
|
30946
|
+
const remedy = outcome.status === "refused" ? `To add the rule, move that stack to a different --state-prefix.` : outcome.accessDenied ? "To add the rule, grant s3:GetLifecycleConfiguration, s3:PutLifecycleConfiguration and s3:ListBucket on the bucket, and check that this account owns it." : `To add the rule, review the bucket's lifecycle configuration against the reason above.`;
|
|
30947
|
+
return `Could not add the ${1}-day expiration lifecycle rule for ${CUSTOM_RESOURCE_RESPONSE_PREFIX}/ to state bucket ${displaySafe(bucket, { asciiOnly: true }) || "<unrenderable>"} (${outcome.reason}). The bucket's lifecycle configuration was left unchanged. Custom-resource response objects left by an interrupted run stay until 'cdkd gc' removes them. ${remedy}`;
|
|
30948
|
+
}
|
|
30949
|
+
const ensured = /* @__PURE__ */ new Map();
|
|
30950
|
+
function ensureCustomResourceResponseExpirationOnce(s3, bucket, log) {
|
|
30951
|
+
const memo = ensured.get(bucket);
|
|
30952
|
+
if (memo) return memo;
|
|
30953
|
+
const run = (async () => {
|
|
30954
|
+
try {
|
|
30955
|
+
const owner = await expectedOwnerParam(s3);
|
|
30956
|
+
const outcome = await applyCustomResourceResponseExpiration(s3, bucket, { ...owner.ExpectedBucketOwner && { expectedBucketOwner: owner.ExpectedBucketOwner } });
|
|
30957
|
+
if (outcome.status === "failed" || outcome.status === "refused") log.warn(customResourceResponseExpirationWarning(bucket, outcome));
|
|
30958
|
+
else if (outcome.status === "added") log.debug(`Added the ${1}-day expiration lifecycle rule for ${CUSTOM_RESOURCE_RESPONSE_PREFIX}/ to the state bucket.`);
|
|
30959
|
+
} catch (error) {
|
|
30960
|
+
log.warn(customResourceResponseExpirationWarning(bucket, failedOutcome("lifecycle check", error)));
|
|
30474
30961
|
}
|
|
30475
|
-
|
|
30476
|
-
|
|
30477
|
-
|
|
30478
|
-
|
|
30479
|
-
|
|
30962
|
+
})();
|
|
30963
|
+
ensured.set(bucket, run);
|
|
30964
|
+
return run;
|
|
30965
|
+
}
|
|
30966
|
+
|
|
30967
|
+
// src/provisioning/providers/custom-resource/invoke-retry.ts
|
|
30968
|
+
async function invokeCustomResourceWithRetry(serviceToken, logicalId, operation, buildRequest, mask, referenced) {
|
|
30969
|
+
const watch = startInterruptWatch(`Custom resource ${logicalId}`);
|
|
30970
|
+
const shown = (text) => mask === void 0 ? text : mask(text);
|
|
30971
|
+
try {
|
|
30972
|
+
const stackId = await this.resolveSyntheticStackId(logicalId, operation, watch);
|
|
30973
|
+
if (referenced !== void 0) await this.waitForReferencedLambdasActive(logicalId, serviceToken, referenced.properties, referenced.previousProperties, watch, mask);
|
|
30974
|
+
let preDeliveryRetries = 0;
|
|
30975
|
+
let failedResponseRetries = 0;
|
|
30976
|
+
for (let attempt = 0;; attempt++) {
|
|
30977
|
+
let delivered = false;
|
|
30978
|
+
let cfnResponse;
|
|
30979
|
+
let logResult;
|
|
30980
|
+
let invocation;
|
|
30981
|
+
try {
|
|
30982
|
+
invocation = await this.prepareInvocation(logicalId, watch, mask);
|
|
30983
|
+
const request = buildRequest({
|
|
30984
|
+
...invocation,
|
|
30985
|
+
stackId
|
|
30986
|
+
});
|
|
30987
|
+
this.logger.debug(`Sending custom resource ${operation.toLowerCase()} request: ${serviceToken}`);
|
|
30988
|
+
const sent = await this.sendRequest(serviceToken, request, invocation.responseKey, logicalId, operation, () => {
|
|
30989
|
+
delivered = true;
|
|
30990
|
+
}, mask);
|
|
30991
|
+
cfnResponse = sent.response;
|
|
30992
|
+
logResult = sent.logResult;
|
|
30993
|
+
} catch (error) {
|
|
30994
|
+
if (delivered || preDeliveryRetries >= this.preDeliveryAuthzMaxRetries || !this.isTransientAuthzThrow(error)) throw error;
|
|
30995
|
+
const delayMs = Math.min(250 * Math.pow(2, preDeliveryRetries), IAM_PROPAGATION_MAX_DELAY_MS);
|
|
30996
|
+
const failure = describeAwsFailure(error);
|
|
30997
|
+
this.logger.warn(`Custom resource ${operation} for ${logicalId} hit a transient IAM-authorization error before the request was delivered (attempt ${attempt + 1}/${this.preDeliveryAuthzMaxRetries + 1}): ${asSentence(this.truncateReason(shown(failure.summary)))} Retrying in ${delayMs / 1e3}s with a fresh response URL and RequestId.`);
|
|
30998
|
+
if (failure.redacted) this.logger.debug(`Custom resource ${operation} for ${logicalId} pre-delivery failure detail: ${shown(failure.detail)}`);
|
|
30999
|
+
if (invocation !== void 0) await this.cleanupResponseObject(invocation.responseKey);
|
|
31000
|
+
preDeliveryRetries += 1;
|
|
31001
|
+
await this.sleepInterruptibly(delayMs, watch);
|
|
31002
|
+
continue;
|
|
31003
|
+
}
|
|
31004
|
+
const reasonIsAuthz = cfnResponse.Status === "FAILED" && this.isTransientAuthzFailure(cfnResponse.Reason);
|
|
31005
|
+
const logTail = cfnResponse.Status === "FAILED" && !reasonIsAuthz ? decodeInvokeLogTail(logResult) : void 0;
|
|
31006
|
+
const logAuthzMatch = logTail === void 0 ? void 0 : this.findTransientAuthzLogLine(logTail);
|
|
31007
|
+
if (cfnResponse.Status === "FAILED" && failedResponseRetries < this.transientAuthzMaxRetries && (reasonIsAuthz || logAuthzMatch !== void 0)) {
|
|
31008
|
+
failedResponseRetries += 1;
|
|
31009
|
+
this.logger.warn(`Custom resource ${operation} for ${logicalId} returned a transient IAM-authorization FAILED (attempt ${attempt + 1}/${this.transientAuthzMaxRetries + 1}): ${this.truncateReason(cfnResponse.Reason === void 0 ? void 0 : shown(cfnResponse.Reason))}. ` + (logAuthzMatch === void 0 ? "" : `The handler's reason carried no authorization wording; the denial was found in the backing function's log: ${this.truncateReason(shown(logAuthzMatch.line))}. `) + `Recycling the backing function's execution environment and retrying so its next cold start picks up the propagated policy.`);
|
|
31010
|
+
await this.recycleBackingFunctionExecEnv(serviceToken, logicalId, mask);
|
|
31011
|
+
continue;
|
|
31012
|
+
}
|
|
31013
|
+
if (cfnResponse.Status === "FAILED" && logAuthzMatch !== void 0) return {
|
|
31014
|
+
...cfnResponse,
|
|
31015
|
+
Reason: `${cfnResponse.Reason ?? "Unknown reason"} [cdkd: the reason carried no authorization wording, but the backing function's invocation log matched the IAM-authorization signal "${logAuthzMatch.signal}" — see the cdkd warning for the log line, or the function's CloudWatch log group]`
|
|
30480
31016
|
};
|
|
30481
|
-
|
|
30482
|
-
|
|
30483
|
-
}
|
|
30484
|
-
}
|
|
30485
|
-
|
|
30486
|
-
return [...this.ordered];
|
|
31017
|
+
if (logTail !== void 0 && hasHandlerLogOutput(logTail)) this.logger.warn(`Custom resource ${operation} for ${logicalId} failed and cdkd could not classify the reason. Log tail from the DISPATCH invocation (for the CDK Provider framework's async pattern the failure may have occurred in a later execution, whose log this is not):\n` + this.truncateReason(shown(logTail), CR_LOG_TAIL_WARN_MAX_CHARS));
|
|
31018
|
+
return cfnResponse;
|
|
31019
|
+
}
|
|
31020
|
+
} finally {
|
|
31021
|
+
watch.dispose();
|
|
30487
31022
|
}
|
|
30488
|
-
};
|
|
30489
|
-
function observingLambdaClient(client, rejections) {
|
|
30490
|
-
const send = client.send.bind(client);
|
|
30491
|
-
const observed = Object.create(client);
|
|
30492
|
-
Object.defineProperty(observed, "send", { value: (...args) => {
|
|
30493
|
-
const result = send(...args);
|
|
30494
|
-
if (!(result instanceof Promise)) return result;
|
|
30495
|
-
return result.catch((error) => {
|
|
30496
|
-
rejections.record(error);
|
|
30497
|
-
throw error;
|
|
30498
|
-
});
|
|
30499
|
-
} });
|
|
30500
|
-
return observed;
|
|
30501
31023
|
}
|
|
30502
|
-
function
|
|
30503
|
-
|
|
30504
|
-
|
|
31024
|
+
function isTransientAuthzFailure(reason) {
|
|
31025
|
+
if (!reason) return false;
|
|
31026
|
+
const lower = reason.toLowerCase();
|
|
31027
|
+
return CR_TRANSIENT_AUTHZ_SIGNALS.some((p) => lower.includes(p));
|
|
30505
31028
|
}
|
|
30506
|
-
function
|
|
30507
|
-
|
|
30508
|
-
|
|
31029
|
+
function isTransientAuthzThrow(error) {
|
|
31030
|
+
if (isMarkedNonRetryable(error)) return false;
|
|
31031
|
+
let current = error;
|
|
31032
|
+
for (let depth = 0; depth < 5 && current != null; depth++) {
|
|
31033
|
+
const message = current instanceof Error ? current.message : typeof current === "string" ? current : "";
|
|
31034
|
+
if (message !== "") {
|
|
31035
|
+
const lower = message.toLowerCase();
|
|
31036
|
+
if (isIamPropagationError(message) || CR_THROWN_AUTHZ_EXTRA_SIGNALS.some((p) => lower.includes(p))) return true;
|
|
31037
|
+
}
|
|
31038
|
+
current = current.cause;
|
|
31039
|
+
}
|
|
31040
|
+
return false;
|
|
30509
31041
|
}
|
|
30510
|
-
function
|
|
30511
|
-
|
|
30512
|
-
const
|
|
30513
|
-
|
|
30514
|
-
|
|
31042
|
+
function findTransientAuthzLogLine(logTail) {
|
|
31043
|
+
if (!logTail) return void 0;
|
|
31044
|
+
for (const line of logTail.split("\n")) {
|
|
31045
|
+
const lower = line.toLowerCase();
|
|
31046
|
+
const signal = CR_TRANSIENT_AUTHZ_LOG_SIGNALS.find((p) => lower.includes(p));
|
|
31047
|
+
if (signal !== void 0) return {
|
|
31048
|
+
line: line.trim(),
|
|
31049
|
+
signal
|
|
31050
|
+
};
|
|
31051
|
+
}
|
|
30515
31052
|
}
|
|
30516
|
-
function
|
|
30517
|
-
const
|
|
30518
|
-
|
|
30519
|
-
|
|
30520
|
-
|
|
30521
|
-
|
|
30522
|
-
|
|
31053
|
+
function truncateReason(reason, max = 200) {
|
|
31054
|
+
const r = displaySafe(reason ?? "Unknown reason");
|
|
31055
|
+
return r.length > max ? `${r.slice(0, max)}...` : r;
|
|
31056
|
+
}
|
|
31057
|
+
async function generateResponseURL(responseKey, logicalId, watch, mask) {
|
|
31058
|
+
if (!this.responseBucket) return "https://localhost/cfn-response-not-configured";
|
|
31059
|
+
let signingEndpoint;
|
|
31060
|
+
try {
|
|
31061
|
+
signingEndpoint = customResourceS3Endpoint();
|
|
31062
|
+
} catch (error) {
|
|
31063
|
+
throw markNonRetryable(error);
|
|
31064
|
+
}
|
|
31065
|
+
await this.ensureResponseClient();
|
|
31066
|
+
const bucket = this.responseBucket;
|
|
31067
|
+
if (this.responsePrefix === "custom-resource-responses") ensureCustomResourceResponseExpirationOnce(this.s3Client, bucket, this.logger);
|
|
31068
|
+
try {
|
|
31069
|
+
await withRetry(() => this.s3Client.send(new PutObjectCommand({
|
|
31070
|
+
Bucket: bucket,
|
|
31071
|
+
Key: responseKey,
|
|
31072
|
+
Body: "",
|
|
31073
|
+
ContentLength: 0,
|
|
31074
|
+
ContentType: "application/json"
|
|
31075
|
+
})), `${logicalId} (custom-resource response placeholder)`, {
|
|
31076
|
+
logger: this.logger,
|
|
31077
|
+
isInterrupted: watch.isInterrupted,
|
|
31078
|
+
onInterrupted: watch.onInterrupted,
|
|
31079
|
+
sleep: customResourceRetryDelays.sleep
|
|
31080
|
+
});
|
|
31081
|
+
} catch (error) {
|
|
31082
|
+
if (error instanceof Error) throw markNonRetryable(error);
|
|
31083
|
+
const failure = describeAwsFailure(error);
|
|
31084
|
+
this.logger.debug(maskerOrIdentity(mask)(`Response placeholder PutObject failure detail: ${failure.detail}`));
|
|
31085
|
+
throw markNonRetryable(new Error(failure.summary));
|
|
31086
|
+
}
|
|
31087
|
+
const command = new PutObjectCommand({
|
|
31088
|
+
Bucket: this.responseBucket,
|
|
31089
|
+
Key: responseKey
|
|
31090
|
+
});
|
|
31091
|
+
let signer = this.s3Client;
|
|
31092
|
+
if (signingEndpoint !== void 0) {
|
|
31093
|
+
signer = await responsePresignClient(this.s3Client, signingEndpoint);
|
|
31094
|
+
this.logger.debug(safeMsg`Signing the custom resource ResponseURL for ${CR_S3_ENDPOINT_ENV} (${signingEndpoint.origin})`);
|
|
31095
|
+
}
|
|
31096
|
+
const presignedUrl = await getSignedUrl(signer, command, { expiresIn: 7200 });
|
|
31097
|
+
this.logger.debug(`Generated pre-signed URL for response: s3://${displaySafe(this.responseBucket, { asciiOnly: true }) || "<unrenderable>"}/${displaySafe(responseKey)}`);
|
|
31098
|
+
return presignedUrl;
|
|
31099
|
+
}
|
|
31100
|
+
|
|
31101
|
+
// src/provisioning/providers/custom-resource/recycle.ts
|
|
31102
|
+
async function recycleBackingFunctionExecEnv(serviceToken, logicalId, mask) {
|
|
31103
|
+
if (this.isSnsServiceToken(serviceToken)) return;
|
|
31104
|
+
const key = recycleFunctionKey(serviceToken);
|
|
31105
|
+
const run = (this.recycleChains.get(key) ?? Promise.resolve()).then(() => this.recycleAndRestore(serviceToken, key, logicalId, mask));
|
|
31106
|
+
const tail = run.catch(() => void 0);
|
|
31107
|
+
this.recycleChains.set(key, tail);
|
|
31108
|
+
try {
|
|
31109
|
+
await run;
|
|
31110
|
+
} finally {
|
|
31111
|
+
if (this.recycleChains.get(key) === tail) this.recycleChains.delete(key);
|
|
30523
31112
|
}
|
|
30524
|
-
return lines;
|
|
30525
31113
|
}
|
|
30526
|
-
function
|
|
30527
|
-
|
|
30528
|
-
|
|
31114
|
+
async function recycleAndRestore(serviceToken, key, logicalId, mask) {
|
|
31115
|
+
const deadline = Date.now() + 240 * 1e3;
|
|
31116
|
+
const remaining = (cap) => Math.min(cap, Math.floor((deadline - Date.now()) / 1e3));
|
|
31117
|
+
const original = await this.readOriginalDescription(serviceToken, key, logicalId, mask);
|
|
31118
|
+
const rejections = new WaiterRejections();
|
|
30529
31119
|
try {
|
|
30530
|
-
|
|
30531
|
-
|
|
31120
|
+
await this.lambdaClient.send(new UpdateFunctionConfigurationCommand({
|
|
31121
|
+
FunctionName: serviceToken,
|
|
31122
|
+
Description: `${CR_RECYCLE_DESCRIPTION_PREFIX}${logicalId})`
|
|
31123
|
+
}));
|
|
31124
|
+
} catch (error) {
|
|
31125
|
+
this.logger.debug(safeMsg`Could not recycle backing function for ${logicalId} (${this.describeRecycleFailure(error, rejections, mask)}); retrying invoke without a forced cold start`);
|
|
30532
31126
|
return;
|
|
30533
31127
|
}
|
|
30534
|
-
|
|
30535
|
-
|
|
30536
|
-
|
|
30537
|
-
|
|
30538
|
-
|
|
30539
|
-
|
|
30540
|
-
|
|
30541
|
-
|
|
30542
|
-
|
|
31128
|
+
try {
|
|
31129
|
+
await this.waitForBackingFunctionUpdated(serviceToken, rejections, remaining(120));
|
|
31130
|
+
} catch (error) {
|
|
31131
|
+
this.logger.debug(safeMsg`Could not recycle backing function for ${logicalId} (${this.describeRecycleFailure(error, rejections, mask)}); retrying invoke without a forced cold start`);
|
|
31132
|
+
this.debugWaiterRejections(logicalId, rejections);
|
|
31133
|
+
}
|
|
31134
|
+
if (original === void 0) {
|
|
31135
|
+
this.logger.debug(safeMsg`Not restoring the backing function's Description for ${logicalId}: its prior value could not be read`);
|
|
31136
|
+
return;
|
|
31137
|
+
}
|
|
31138
|
+
const restoreRejections = new WaiterRejections();
|
|
31139
|
+
for (let attempt = 0;; attempt++) try {
|
|
31140
|
+
await this.lambdaClient.send(new UpdateFunctionConfigurationCommand({
|
|
31141
|
+
FunctionName: serviceToken,
|
|
31142
|
+
Description: original
|
|
31143
|
+
}));
|
|
31144
|
+
break;
|
|
31145
|
+
} catch (error) {
|
|
31146
|
+
const conflictWait = remaining(60);
|
|
31147
|
+
if (error instanceof Error && error.name === "ResourceConflictException" && attempt < 2 && conflictWait >= 2) {
|
|
31148
|
+
const conflictRejections = new WaiterRejections();
|
|
31149
|
+
try {
|
|
31150
|
+
await this.waitForBackingFunctionUpdated(serviceToken, conflictRejections, conflictWait);
|
|
31151
|
+
} catch {}
|
|
30543
31152
|
continue;
|
|
30544
31153
|
}
|
|
30545
|
-
|
|
30546
|
-
|
|
30547
|
-
|
|
30548
|
-
|
|
30549
|
-
|
|
30550
|
-
}
|
|
31154
|
+
this.logger.debug(safeMsg`Could not restore the backing function's Description after the recycle for ${logicalId} (${this.describeRecycleFailure(error, restoreRejections, mask)}); \`cdkd drift\` will report it until the function is next updated`);
|
|
31155
|
+
return;
|
|
31156
|
+
}
|
|
31157
|
+
const settleWait = remaining(120);
|
|
31158
|
+
if (settleWait < 2) {
|
|
31159
|
+
this.logger.debug(safeMsg`Restored the backing function's Description after the recycle for ${logicalId}, but the recycle's time budget ran out before the update settled`);
|
|
31160
|
+
return;
|
|
31161
|
+
}
|
|
31162
|
+
try {
|
|
31163
|
+
await this.waitForBackingFunctionUpdated(serviceToken, restoreRejections, settleWait);
|
|
31164
|
+
} catch (error) {
|
|
31165
|
+
this.logger.debug(safeMsg`Restored the backing function's Description after the recycle for ${logicalId}, but the update did not settle (${this.describeRecycleFailure(error, restoreRejections, mask)})`);
|
|
31166
|
+
this.debugWaiterRejections(logicalId, restoreRejections);
|
|
30551
31167
|
}
|
|
30552
|
-
const lines = [];
|
|
30553
|
-
let payloads = 0;
|
|
30554
|
-
let rejectionKeys = 0;
|
|
30555
|
-
for (const [key, count] of Object.entries(observed)) if (key.startsWith("{") || key.startsWith("[")) payloads += 1;
|
|
30556
|
-
else if (/^\d{3}: OK$/.test(key)) lines.push(typeof count === "number" ? `(x${count}) ${key}` : key);
|
|
30557
|
-
else rejectionKeys += 1;
|
|
30558
|
-
const recorded = rejections.entries();
|
|
30559
|
-
for (const { error: rejection, count } of recorded) lines.push(rejectionLine(rejection, count));
|
|
30560
|
-
if (lines.length > 0) parts.push(`observed: ${lines.join("; ")}`);
|
|
30561
|
-
if (payloads > 0) parts.push(`${payloads} observed response(s) withheld`);
|
|
30562
|
-
const nonErrors = rejections.nonErrors;
|
|
30563
|
-
if (nonErrors > 0) parts.push(`${nonErrors} non-Error rejection(s) withheld`);
|
|
30564
|
-
if (recorded.length === 0 && nonErrors === 0 && rejectionKeys > 0) parts.push(`${rejectionKeys} observed error message(s) withheld`);
|
|
30565
|
-
const state = typeof result.state === "string" ? result.state : "failure";
|
|
30566
|
-
const reason = typeof result.reason === "string" && result.reason !== "" ? `: ${result.reason}` : "";
|
|
30567
|
-
return {
|
|
30568
|
-
text: `${error.name} (waiter ${state}${reason}; ${parts.length > 0 ? parts.join(", ") : "no function status reported"}). ` + (reasons.length > 0 ? `${VERBOSE_POINTER} ` : "") + "The waiter's raw payload is withheld because it embeds the whole GetFunction response, environment variables included; run `aws lambda get-function` for the detail.",
|
|
30569
|
-
reasons
|
|
30570
|
-
};
|
|
30571
31168
|
}
|
|
30572
|
-
function
|
|
30573
|
-
|
|
30574
|
-
if (failure === void 0 || !(error instanceof Error)) return void 0;
|
|
30575
|
-
for (const reason of failure.reasons) debug(safeMsg`Lambda waiter status reason: ${reason}`);
|
|
30576
|
-
const described = failure.text;
|
|
30577
|
-
const header = `${error.name}: ${error.message}`;
|
|
30578
|
-
const stack = typeof error.stack === "string" ? error.stack : "";
|
|
31169
|
+
async function readOriginalDescription(serviceToken, key, logicalId, mask) {
|
|
31170
|
+
let current;
|
|
30579
31171
|
try {
|
|
30580
|
-
|
|
30581
|
-
|
|
30582
|
-
|
|
30583
|
-
|
|
30584
|
-
|
|
30585
|
-
|
|
30586
|
-
|
|
30587
|
-
|
|
30588
|
-
|
|
30589
|
-
|
|
30590
|
-
enumerable: false
|
|
30591
|
-
});
|
|
30592
|
-
} catch {}
|
|
30593
|
-
return described;
|
|
31172
|
+
const config = await this.lambdaClient.send(new GetFunctionConfigurationCommand({ FunctionName: serviceToken }));
|
|
31173
|
+
if (config.FunctionName !== void 0) current = config.Description ?? "";
|
|
31174
|
+
} catch (error) {
|
|
31175
|
+
this.logger.debug(safeMsg`Could not read the backing function's Description for ${logicalId} before recycling it (${this.describeRecycleFailure(error, new WaiterRejections(), mask)})`);
|
|
31176
|
+
}
|
|
31177
|
+
if (current !== void 0 && !current.startsWith("cdkd: recycled for IAM-propagation retry (")) {
|
|
31178
|
+
this.originalDescriptions.set(key, current);
|
|
31179
|
+
return current;
|
|
31180
|
+
}
|
|
31181
|
+
return this.originalDescriptions.get(key);
|
|
30594
31182
|
}
|
|
30595
|
-
function
|
|
30596
|
-
|
|
30597
|
-
|
|
30598
|
-
|
|
31183
|
+
async function waitForBackingFunctionUpdated(serviceToken, rejections, maxWaitTime = 120) {
|
|
31184
|
+
await waitUntilFunctionUpdatedV2({
|
|
31185
|
+
client: observingLambdaClient(this.lambdaClient, rejections),
|
|
31186
|
+
maxWaitTime,
|
|
31187
|
+
minDelay: 1,
|
|
31188
|
+
maxDelay: 5
|
|
31189
|
+
}, { FunctionName: serviceToken });
|
|
30599
31190
|
}
|
|
30600
|
-
|
|
30601
|
-
|
|
31191
|
+
function describeRecycleFailure(error, rejections, mask) {
|
|
31192
|
+
return withholdWaiterPayload(error, rejections, (line) => this.logger.debug(maskerOrIdentity(mask)(line))) ?? (error instanceof Error && carriesResponseBody(error) ? `${error.name} (response body withheld)` : describeAwsFailure(error).detail);
|
|
31193
|
+
}
|
|
31194
|
+
function debugWaiterRejections(logicalId, rejections) {
|
|
31195
|
+
for (const line of waiterRejectionDebugLines(rejections)) this.logger.debug(safeMsg`Readiness waiter for ${logicalId} observed ${line}`);
|
|
31196
|
+
}
|
|
31197
|
+
|
|
31198
|
+
// src/provisioning/providers/custom-resource/dispatch.ts
|
|
31199
|
+
async function sendRequest(serviceToken, request, responseKey, logicalId, operation, onDelivered, mask) {
|
|
31200
|
+
if (this.isSnsServiceToken(serviceToken)) {
|
|
31201
|
+
this.logger.debug(`ServiceToken is SNS topic, publishing to: ${serviceToken}`);
|
|
31202
|
+
await this.publishToSns(serviceToken, request);
|
|
31203
|
+
onDelivered();
|
|
31204
|
+
return { response: await this.pollS3Response(responseKey, logicalId, operation) };
|
|
31205
|
+
}
|
|
31206
|
+
await this.waitForBackingLambdaReady(serviceToken, logicalId, mask);
|
|
31207
|
+
const invokeResponse = await this.invokeLambda(serviceToken, request);
|
|
31208
|
+
onDelivered();
|
|
31209
|
+
return {
|
|
31210
|
+
response: await this.getCustomResourceResponse(invokeResponse, responseKey, logicalId, operation, mask),
|
|
31211
|
+
...invokeResponse.LogResult === void 0 ? {} : { logResult: invokeResponse.LogResult }
|
|
31212
|
+
};
|
|
31213
|
+
}
|
|
31214
|
+
async function waitForBackingLambdaReady(serviceToken, logicalId, mask) {
|
|
31215
|
+
let rejections = new WaiterRejections();
|
|
30602
31216
|
try {
|
|
30603
31217
|
await waitUntilFunctionActiveV2({
|
|
30604
|
-
client: observingLambdaClient(
|
|
30605
|
-
maxWaitTime:
|
|
31218
|
+
client: observingLambdaClient(this.lambdaClient, rejections),
|
|
31219
|
+
maxWaitTime: 600,
|
|
30606
31220
|
minDelay: 1,
|
|
30607
|
-
maxDelay: 5
|
|
30608
|
-
|
|
30609
|
-
|
|
31221
|
+
maxDelay: 5
|
|
31222
|
+
}, { FunctionName: serviceToken });
|
|
31223
|
+
rejections = new WaiterRejections();
|
|
31224
|
+
await waitUntilFunctionUpdatedV2({
|
|
31225
|
+
client: observingLambdaClient(this.lambdaClient, rejections),
|
|
31226
|
+
maxWaitTime: 600,
|
|
31227
|
+
minDelay: 1,
|
|
31228
|
+
maxDelay: 5
|
|
31229
|
+
}, { FunctionName: serviceToken });
|
|
30610
31230
|
} catch (error) {
|
|
30611
|
-
|
|
30612
|
-
|
|
30613
|
-
|
|
31231
|
+
this.debugWaiterRejections(logicalId, rejections);
|
|
31232
|
+
throw markNonRetryable(new Error(`Lambda backing custom resource ${logicalId} (${serviceToken}) did not reach a ready state for Invoke: ${describeWaiterFailure(error, rejections, (line) => this.logger.debug(maskerOrIdentity(mask)(line)))}`, { cause: error }));
|
|
31233
|
+
}
|
|
31234
|
+
}
|
|
31235
|
+
async function waitForReferencedLambdasActive(logicalId, serviceToken, properties, previousProperties, watch, mask) {
|
|
31236
|
+
const debug = (line) => this.logger.debug(maskerOrIdentity(mask)(line));
|
|
31237
|
+
const already = new Set(previousProperties === void 0 ? [] : collectReferencedLambdaFunctionArns(previousProperties, serviceToken, Infinity));
|
|
31238
|
+
const fresh = collectReferencedLambdaFunctionArns(properties, serviceToken, Infinity).filter((arn) => !already.has(arn));
|
|
31239
|
+
if (fresh.length > 16) debug(safeMsg`${logicalId} references ${fresh.length} Lambda functions; only the first ${16} are waited for`);
|
|
31240
|
+
const arns = fresh.slice(0, 16);
|
|
31241
|
+
const deadline = Date.now() + 600 * 1e3;
|
|
31242
|
+
const abort = new AbortController();
|
|
31243
|
+
const poll = setInterval(() => {
|
|
31244
|
+
if (watch.isInterrupted()) abort.abort();
|
|
31245
|
+
}, 1e3);
|
|
31246
|
+
try {
|
|
31247
|
+
for (const arn of arns) {
|
|
31248
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31249
|
+
let state;
|
|
31250
|
+
try {
|
|
31251
|
+
state = (await this.lambdaClient.send(new GetFunctionConfigurationCommand({ FunctionName: arn }), { abortSignal: abort.signal })).State;
|
|
31252
|
+
} catch (error) {
|
|
31253
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31254
|
+
debug(safeMsg`Not waiting for ${arn} referenced by ${logicalId}: ${describeAwsFailure(error).summary}`);
|
|
31255
|
+
continue;
|
|
31256
|
+
}
|
|
31257
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31258
|
+
if (state !== "Pending") continue;
|
|
31259
|
+
const remainingSeconds = Math.floor((deadline - Date.now()) / 1e3);
|
|
31260
|
+
if (remainingSeconds <= 1) {
|
|
31261
|
+
debug(safeMsg`The wait budget for the functions referenced by ${logicalId} is spent; leaving ${arn} to the handler`);
|
|
31262
|
+
break;
|
|
31263
|
+
}
|
|
31264
|
+
debug(safeMsg`Waiting for ${arn} referenced by ${logicalId} to become Active`);
|
|
31265
|
+
try {
|
|
31266
|
+
await waitForLambdaFunctionActive(this.lambdaClient, arn, abort.signal, remainingSeconds);
|
|
31267
|
+
} catch (error) {
|
|
31268
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31269
|
+
debug(safeMsg`Referenced function ${arn} of ${logicalId} did not become Active; leaving it to the handler: ${describeAwsFailure(error).summary}`);
|
|
31270
|
+
}
|
|
31271
|
+
}
|
|
31272
|
+
} finally {
|
|
31273
|
+
clearInterval(poll);
|
|
30614
31274
|
}
|
|
30615
31275
|
}
|
|
30616
|
-
|
|
30617
|
-
|
|
30618
|
-
|
|
30619
|
-
|
|
30620
|
-
|
|
30621
|
-
|
|
30622
|
-
|
|
30623
|
-
|
|
30624
|
-
|
|
30625
|
-
|
|
30626
|
-
|
|
31276
|
+
async function publishToSns(topicArn, request) {
|
|
31277
|
+
await this.snsClient.send(new PublishCommand({
|
|
31278
|
+
TopicArn: topicArn,
|
|
31279
|
+
Message: JSON.stringify(request)
|
|
31280
|
+
}));
|
|
31281
|
+
}
|
|
31282
|
+
async function invokeLambda(serviceToken, request) {
|
|
31283
|
+
return await this.lambdaClient.send(new InvokeCommand({
|
|
31284
|
+
FunctionName: serviceToken,
|
|
31285
|
+
InvocationType: "RequestResponse",
|
|
31286
|
+
LogType: "Tail",
|
|
31287
|
+
Payload: Buffer.from(JSON.stringify(request))
|
|
31288
|
+
}));
|
|
31289
|
+
}
|
|
31290
|
+
|
|
31291
|
+
// src/provisioning/providers/custom-resource/response.ts
|
|
31292
|
+
async function getCustomResourceResponse(lambdaResponse, responseKey, logicalId, operation, mask) {
|
|
31293
|
+
if (lambdaResponse.FunctionError) {
|
|
31294
|
+
const errorPayload = lambdaResponse.Payload ? Buffer.from(lambdaResponse.Payload).toString() : "Unknown";
|
|
31295
|
+
const logTail = decodeInvokeLogTail(lambdaResponse.LogResult);
|
|
31296
|
+
if (logTail !== void 0 && hasHandlerLogOutput(logTail)) this.logger.warn(`Backing function log tail for ${logicalId} (${operation}):\n` + this.truncateReason(mask === void 0 ? logTail : mask(logTail), CR_LOG_TAIL_WARN_MAX_CHARS));
|
|
31297
|
+
throw new Error(`Lambda function error (${lambdaResponse.FunctionError}): ${mask === void 0 ? errorPayload : mask(errorPayload)}`);
|
|
31298
|
+
}
|
|
31299
|
+
let hasDirectPayload = false;
|
|
31300
|
+
try {
|
|
31301
|
+
const payload = parseLambdaPayload(lambdaResponse.Payload, mask);
|
|
31302
|
+
if ("Status" in payload && (payload["Status"] === "SUCCESS" || payload["Status"] === "FAILED")) {
|
|
31303
|
+
this.logger.debug(`Got direct cfn-response from Lambda for ${logicalId}`);
|
|
31304
|
+
await this.cleanupResponseObject(responseKey);
|
|
31305
|
+
return payload;
|
|
30627
31306
|
}
|
|
30628
|
-
if (
|
|
30629
|
-
|
|
30630
|
-
|
|
31307
|
+
if (payload.PhysicalResourceId || payload.Data) {
|
|
31308
|
+
this.logger.debug(`Got simple handler response from Lambda for ${logicalId}`);
|
|
31309
|
+
await this.cleanupResponseObject(responseKey);
|
|
31310
|
+
const result = { Status: "SUCCESS" };
|
|
31311
|
+
if (payload.PhysicalResourceId) result.PhysicalResourceId = payload.PhysicalResourceId;
|
|
31312
|
+
if (payload.Data) result.Data = payload.Data;
|
|
31313
|
+
if (payload.NoEcho === true) result.NoEcho = true;
|
|
31314
|
+
return result;
|
|
30631
31315
|
}
|
|
30632
|
-
|
|
30633
|
-
}
|
|
30634
|
-
|
|
30635
|
-
|
|
31316
|
+
hasDirectPayload = Object.keys(payload).length > 0;
|
|
31317
|
+
} catch {
|
|
31318
|
+
this.logger.debug(`Lambda payload parse failed for ${logicalId}, checking S3 response`);
|
|
31319
|
+
}
|
|
31320
|
+
if (!this.responseBucket) {
|
|
31321
|
+
this.logger.warn(`No response bucket configured for custom resource ${logicalId}. The Lambda handler likely uses cfn-response module which sends to ResponseURL. Configure --state-bucket to enable S3-based response handling.`);
|
|
31322
|
+
return {
|
|
31323
|
+
Status: "SUCCESS",
|
|
31324
|
+
PhysicalResourceId: logicalId
|
|
31325
|
+
};
|
|
31326
|
+
}
|
|
31327
|
+
const isAsyncPattern = !hasDirectPayload;
|
|
31328
|
+
if (isAsyncPattern) this.logger.debug(`Custom resource ${logicalId} uses async Provider framework. Waiting up to ${Math.round(this.asyncResponseTimeoutMs / 6e4)} minutes.`);
|
|
31329
|
+
else this.logger.debug(`Waiting for S3 response from Lambda for ${logicalId} (${operation})`);
|
|
31330
|
+
const timeoutMs = isAsyncPattern ? this.asyncResponseTimeoutMs : this.SYNC_RESPONSE_TIMEOUT_MS;
|
|
31331
|
+
return await this.pollS3Response(responseKey, logicalId, operation, timeoutMs, isAsyncPattern);
|
|
30636
31332
|
}
|
|
30637
|
-
|
|
30638
|
-
|
|
30639
|
-
|
|
30640
|
-
|
|
30641
|
-
|
|
30642
|
-
|
|
30643
|
-
|
|
30644
|
-
|
|
30645
|
-
const CR_THROWN_AUTHZ_EXTRA_SIGNALS = ["no identity-based policy allows", "not in the state functionactive"];
|
|
30646
|
-
const CR_TRANSIENT_AUTHZ_LOG_SIGNALS = [
|
|
30647
|
-
...CR_TRANSIENT_AUTHZ_SIGNALS,
|
|
30648
|
-
"an error occurred (403)",
|
|
30649
|
-
"accessdenied",
|
|
30650
|
-
"access denied"
|
|
30651
|
-
];
|
|
30652
|
-
const CR_LOG_TAIL_WARN_MAX_CHARS = 2e3;
|
|
30653
|
-
const CR_RECYCLE_DESCRIPTION_PREFIX = "cdkd: recycled for IAM-propagation retry (";
|
|
30654
|
-
const CR_RECYCLE_RESTORE_CONFLICT_RETRIES = 2;
|
|
30655
|
-
const CR_RECYCLE_RESTORE_CONFLICT_WAIT_SECONDS = 60;
|
|
30656
|
-
const CR_RECYCLE_BUDGET_SECONDS = 240;
|
|
30657
|
-
const CR_RECYCLE_MIN_WAIT_SECONDS = 2;
|
|
30658
|
-
function recycleFunctionKey(serviceToken) {
|
|
30659
|
-
if (!LAMBDA_FUNCTION_ARN.test(serviceToken)) return serviceToken;
|
|
30660
|
-
return serviceToken.split(":").slice(0, 7).join(":");
|
|
31333
|
+
async function prepareInvocation(logicalId, watch, mask) {
|
|
31334
|
+
const requestId = `cdkd-${Date.now()}-${Math.random().toString(36).substring(7)}`;
|
|
31335
|
+
const responseKey = this.getResponseKey(requestId);
|
|
31336
|
+
return {
|
|
31337
|
+
requestId,
|
|
31338
|
+
responseKey,
|
|
31339
|
+
responseURL: await this.generateResponseURL(responseKey, logicalId, watch, mask)
|
|
31340
|
+
};
|
|
30661
31341
|
}
|
|
30662
|
-
|
|
30663
|
-
const
|
|
30664
|
-
|
|
30665
|
-
|
|
30666
|
-
|
|
30667
|
-
|
|
30668
|
-
|
|
30669
|
-
|
|
30670
|
-
|
|
30671
|
-
|
|
30672
|
-
|
|
30673
|
-
|
|
30674
|
-
|
|
31342
|
+
async function pollS3Response(responseKey, logicalId, operation, timeoutMs = this.SYNC_RESPONSE_TIMEOUT_MS, useBackoff = false) {
|
|
31343
|
+
const startTime = Date.now();
|
|
31344
|
+
let currentInterval = this.INITIAL_POLL_INTERVAL_MS;
|
|
31345
|
+
let pollCount = 0;
|
|
31346
|
+
let interrupted = false;
|
|
31347
|
+
const sigintHandler = () => {
|
|
31348
|
+
interrupted = true;
|
|
31349
|
+
};
|
|
31350
|
+
process.on("SIGINT", sigintHandler);
|
|
31351
|
+
try {
|
|
31352
|
+
while (Date.now() - startTime < timeoutMs) {
|
|
31353
|
+
if (interrupted) {
|
|
31354
|
+
await this.cleanupResponseObject(responseKey);
|
|
31355
|
+
process.removeListener("SIGINT", sigintHandler);
|
|
31356
|
+
throw new Error(`Custom resource ${logicalId} interrupted by user`);
|
|
31357
|
+
}
|
|
31358
|
+
pollCount++;
|
|
31359
|
+
try {
|
|
31360
|
+
const body = await (await this.s3Client.send(new GetObjectCommand({
|
|
31361
|
+
Bucket: this.responseBucket,
|
|
31362
|
+
Key: responseKey
|
|
31363
|
+
}))).Body?.transformToString();
|
|
31364
|
+
if (body && body.length > 0) {
|
|
31365
|
+
const parsed = parseCfnResponseBody(body);
|
|
31366
|
+
this.logger.debug(`Got S3 response for ${logicalId}: ${describeCfnResponseBody(body, parsed)}`);
|
|
31367
|
+
if (parsed.kind === "envelope") {
|
|
31368
|
+
const cfnResponse = parsed.response;
|
|
31369
|
+
if (cfnResponse.Status === "SUCCESS" || cfnResponse.Status === "FAILED") {
|
|
31370
|
+
await this.cleanupResponseObject(responseKey);
|
|
31371
|
+
return cfnResponse;
|
|
31372
|
+
}
|
|
31373
|
+
} else this.logger.debug(`S3 response not yet valid JSON for ${logicalId}, retrying...`);
|
|
31374
|
+
}
|
|
31375
|
+
} catch (error) {
|
|
31376
|
+
const err = error;
|
|
31377
|
+
if (err.name !== "NoSuchKey") this.logger.debug(`Error reading S3 response for ${logicalId}: ${err.name}`);
|
|
31378
|
+
}
|
|
31379
|
+
await this.sleep(currentInterval);
|
|
31380
|
+
if (useBackoff) {
|
|
31381
|
+
currentInterval = Math.min(currentInterval * 1.5, this.MAX_POLL_INTERVAL_MS);
|
|
31382
|
+
if (pollCount % 10 === 0) {
|
|
31383
|
+
const elapsedSec = Math.round((Date.now() - startTime) / 1e3);
|
|
31384
|
+
this.logger.info(`Still waiting for async custom resource ${logicalId} (${operation})... ${elapsedSec}s elapsed, polling every ${Math.round(currentInterval / 1e3)}s`);
|
|
31385
|
+
}
|
|
31386
|
+
}
|
|
31387
|
+
}
|
|
31388
|
+
await this.cleanupResponseObject(responseKey);
|
|
31389
|
+
const elapsedMin = Math.round((Date.now() - startTime) / 6e4);
|
|
31390
|
+
throw new Error(`Timeout waiting for custom resource response for ${logicalId} (${operation}) after ${elapsedMin} minutes. ` + (useBackoff ? "The async custom resource handler (Provider framework with isCompleteHandler) did not complete within the timeout. Check the Step Functions execution and isCompleteHandler Lambda logs for errors." : `The Lambda handler may not be sending a response to ResponseURL.`));
|
|
31391
|
+
} finally {
|
|
31392
|
+
process.removeListener("SIGINT", sigintHandler);
|
|
31393
|
+
}
|
|
30675
31394
|
}
|
|
30676
|
-
function
|
|
30677
|
-
return
|
|
31395
|
+
function getResponseKey(requestId) {
|
|
31396
|
+
return `${this.responsePrefix}/${requestId}.json`;
|
|
30678
31397
|
}
|
|
30679
|
-
function
|
|
30680
|
-
|
|
31398
|
+
async function cleanupResponseObject(responseKey) {
|
|
31399
|
+
if (!this.responseBucket) return;
|
|
31400
|
+
const bucket = this.responseBucket;
|
|
30681
31401
|
try {
|
|
30682
|
-
|
|
30683
|
-
|
|
30684
|
-
|
|
31402
|
+
await this.s3Client.send(new DeleteObjectCommand({
|
|
31403
|
+
Bucket: bucket,
|
|
31404
|
+
Key: responseKey
|
|
31405
|
+
}));
|
|
31406
|
+
} catch (error) {
|
|
31407
|
+
this.logger.debug(`Failed to delete custom-resource response object s3://${displaySafe(bucket, { asciiOnly: true }) || "<unrenderable>"}/${displaySafe(responseKey)}; it remains as a current object. Underlying error: ${displaySafe(describeAwsFailure(error).detail) || "<unrenderable>"}`);
|
|
30685
31408
|
}
|
|
30686
|
-
|
|
30687
|
-
|
|
30688
|
-
|
|
30689
|
-
|
|
30690
|
-
};
|
|
31409
|
+
await purgeNoncurrentKeyVersions(this.s3Client, bucket, [responseKey], {
|
|
31410
|
+
logger: this.logger,
|
|
31411
|
+
objectDescription: CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION
|
|
31412
|
+
});
|
|
30691
31413
|
}
|
|
30692
|
-
function
|
|
30693
|
-
const
|
|
30694
|
-
const
|
|
30695
|
-
|
|
31414
|
+
function stringifyProperties(properties) {
|
|
31415
|
+
const result = {};
|
|
31416
|
+
for (const [key, value] of Object.entries(properties)) if (typeof value === "boolean") result[key] = String(value);
|
|
31417
|
+
else if (typeof value === "number") result[key] = String(value);
|
|
31418
|
+
else if (typeof value === "object" && value !== null && !Array.isArray(value)) result[key] = this.stringifyProperties(value);
|
|
31419
|
+
else result[key] = value;
|
|
31420
|
+
return result;
|
|
30696
31421
|
}
|
|
30697
|
-
|
|
30698
|
-
|
|
30699
|
-
const DESCRIBE_MAX_DATA_KEYS = 20;
|
|
30700
|
-
function describeCfnResponseBody(body, parsed) {
|
|
30701
|
-
if (parsed.kind !== "envelope") return `${parsed.kind === "unparseable" ? "unparseable body" : "JSON body is not an object"} (${body.length} chars)`;
|
|
30702
|
-
const envelope = parsed.response;
|
|
30703
|
-
const status = typeof envelope["Status"] === "string" ? envelope["Status"] : "<absent>";
|
|
30704
|
-
const physicalId = typeof envelope["PhysicalResourceId"] === "string" ? envelope["PhysicalResourceId"] : "<absent>";
|
|
30705
|
-
const data = envelope["Data"];
|
|
30706
|
-
let dataPart;
|
|
30707
|
-
if (data === void 0) dataPart = "Data absent";
|
|
30708
|
-
else if (typeof data === "object" && data !== null && !Array.isArray(data)) {
|
|
30709
|
-
const keys = Object.keys(data);
|
|
30710
|
-
const shown = keys.slice(0, DESCRIBE_MAX_DATA_KEYS).map((k) => capForLog(k));
|
|
30711
|
-
const omitted = keys.length - shown.length;
|
|
30712
|
-
dataPart = `Data keys [${shown.join(", ")}${omitted > 0 ? `, +${omitted} more` : ""}]`;
|
|
30713
|
-
} else dataPart = "Data not an object";
|
|
30714
|
-
const line = `Status=${capForLog(status)} PhysicalResourceId=${capForLog(physicalId)} ${dataPart}`;
|
|
30715
|
-
return line.length > DESCRIBE_MAX_LINE_CHARS ? `${line.slice(0, DESCRIBE_MAX_LINE_CHARS)}...(${line.length} chars total)` : line;
|
|
31422
|
+
function sleep(ms) {
|
|
31423
|
+
return customResourceRetryDelays.sleep(ms);
|
|
30716
31424
|
}
|
|
30717
|
-
function
|
|
30718
|
-
|
|
31425
|
+
async function sleepInterruptibly(ms, watch) {
|
|
31426
|
+
let remaining = ms;
|
|
31427
|
+
while (remaining > 0) {
|
|
31428
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31429
|
+
const chunk = Math.min(1e3, remaining);
|
|
31430
|
+
await this.sleep(chunk);
|
|
31431
|
+
remaining -= chunk;
|
|
31432
|
+
}
|
|
31433
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31434
|
+
}
|
|
31435
|
+
async function importImpl(input) {
|
|
31436
|
+
if (input.knownPhysicalId) return {
|
|
31437
|
+
physicalId: input.knownPhysicalId,
|
|
31438
|
+
attributes: {}
|
|
31439
|
+
};
|
|
31440
|
+
return null;
|
|
30719
31441
|
}
|
|
31442
|
+
|
|
31443
|
+
// src/provisioning/providers/custom-resource-provider.ts
|
|
30720
31444
|
var CustomResourceProvider = class CustomResourceProvider {
|
|
30721
31445
|
lambdaClient;
|
|
30722
31446
|
snsClient;
|
|
@@ -30738,11 +31462,11 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
30738
31462
|
MAX_POLL_INTERVAL_MS = 3e4;
|
|
30739
31463
|
transientAuthzMaxRetries = (() => {
|
|
30740
31464
|
const raw = process.env["CDKD_CR_AUTHZ_MAX_RETRIES"];
|
|
30741
|
-
if (raw === void 0 || raw === "") return
|
|
31465
|
+
if (raw === void 0 || raw === "") return 2;
|
|
30742
31466
|
const n = Number(raw);
|
|
30743
|
-
if (!Number.isFinite(n) || n < 0) return
|
|
30744
|
-
const clamped = Math.min(Math.floor(n),
|
|
30745
|
-
if (clamped !== n) this.logger.warn(`CDKD_CR_AUTHZ_MAX_RETRIES=${raw} is out of range; using ${clamped} (whole numbers, at most ${
|
|
31467
|
+
if (!Number.isFinite(n) || n < 0) return 2;
|
|
31468
|
+
const clamped = Math.min(Math.floor(n), 10);
|
|
31469
|
+
if (clamped !== n) this.logger.warn(`CDKD_CR_AUTHZ_MAX_RETRIES=${raw} is out of range; using ${clamped} (whole numbers, at most ${10} — each retry re-invokes the custom resource handler).`);
|
|
30746
31470
|
return clamped;
|
|
30747
31471
|
})();
|
|
30748
31472
|
preDeliveryAuthzMaxRetries = 26;
|
|
@@ -30758,709 +31482,118 @@ var CustomResourceProvider = class CustomResourceProvider {
|
|
|
30758
31482
|
this.asyncResponseTimeoutMs = config?.asyncResponseTimeoutMs ?? CustomResourceProvider.DEFAULT_ASYNC_RESPONSE_TIMEOUT_MS;
|
|
30759
31483
|
}
|
|
30760
31484
|
getMinResourceTimeoutMs() {
|
|
30761
|
-
return this
|
|
31485
|
+
return getMinResourceTimeoutMs$1.call(this);
|
|
30762
31486
|
}
|
|
30763
31487
|
setResponseBucket(bucket) {
|
|
30764
|
-
this
|
|
30765
|
-
this.responseClientGeneration++;
|
|
30766
|
-
this.responseClientResolved = false;
|
|
30767
|
-
this.responseClientResolveInFlight = null;
|
|
31488
|
+
return setResponseBucket.call(this, bucket);
|
|
30768
31489
|
}
|
|
30769
31490
|
replaceS3Client(replacement) {
|
|
30770
|
-
|
|
30771
|
-
this.s3Client = replacement;
|
|
30772
|
-
this.ownsS3Client = true;
|
|
30773
|
-
}
|
|
30774
|
-
async ensureResponseClient() {
|
|
30775
|
-
if (this.responseClientResolved || !this.responseBucket) return;
|
|
30776
|
-
if (this.responseClientResolveInFlight) return this.responseClientResolveInFlight;
|
|
30777
|
-
const bucket = this.responseBucket;
|
|
30778
|
-
const generation = this.responseClientGeneration;
|
|
30779
|
-
this.responseClientResolveInFlight = (async () => {
|
|
30780
|
-
try {
|
|
30781
|
-
const replacement = await rebuildClientForBucketRegion(this.s3Client, bucket, {
|
|
30782
|
-
reuseClientCredentials: true,
|
|
30783
|
-
tolerateNonStandardClient: true,
|
|
30784
|
-
onRebuild: ({ bucketRegion, currentRegion }) => {
|
|
30785
|
-
this.logger.debug(`Custom resource response bucket ${displayIdent(bucket)} is in ${displayIdent(bucketRegion)} (client was ${displayIdent(currentRegion)}); building a region-corrected S3 client for response operations.`);
|
|
30786
|
-
}
|
|
30787
|
-
});
|
|
30788
|
-
if (generation !== this.responseClientGeneration) {
|
|
30789
|
-
replacement?.destroy?.();
|
|
30790
|
-
return;
|
|
30791
|
-
}
|
|
30792
|
-
if (replacement) this.replaceS3Client(replacement);
|
|
30793
|
-
this.responseClientResolved = true;
|
|
30794
|
-
} finally {
|
|
30795
|
-
if (generation === this.responseClientGeneration) this.responseClientResolveInFlight = null;
|
|
30796
|
-
}
|
|
30797
|
-
})();
|
|
30798
|
-
return this.responseClientResolveInFlight;
|
|
31491
|
+
return replaceS3Client.call(this, replacement);
|
|
30799
31492
|
}
|
|
30800
|
-
|
|
30801
|
-
|
|
30802
|
-
|
|
30803
|
-
|
|
30804
|
-
|
|
30805
|
-
const delayMs = retryDelays[attempt];
|
|
30806
|
-
if (!(error instanceof AccountIdUnavailableError) || delayMs === void 0) throw error;
|
|
30807
|
-
this.logger.warn(`Custom resource ${logicalId}: the Delete request cannot be sent until the account is known: ${error.message} Asking again in ${delayMs / 1e3}s (attempt ${attempt + 1}/${retryDelays.length + 1}).`);
|
|
30808
|
-
await this.sleepInterruptibly(delayMs, watch);
|
|
30809
|
-
}
|
|
31493
|
+
ensureResponseClient() {
|
|
31494
|
+
return ensureResponseClient.call(this);
|
|
31495
|
+
}
|
|
31496
|
+
resolveSyntheticStackId(logicalId, operation, watch) {
|
|
31497
|
+
return resolveSyntheticStackId.call(this, logicalId, operation, watch);
|
|
30810
31498
|
}
|
|
30811
31499
|
wrapCaughtError(mask, error, build) {
|
|
30812
|
-
|
|
30813
|
-
if (!failure.redacted) return build(failure.detail);
|
|
30814
|
-
this.logger.debug(maskerOrIdentity(mask)(build(failure.detail).message));
|
|
30815
|
-
const wrapped = build(failure.summary);
|
|
30816
|
-
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
31500
|
+
return wrapCaughtError.call(this, mask, error, build);
|
|
30817
31501
|
}
|
|
30818
|
-
|
|
30819
|
-
|
|
30820
|
-
const serviceToken = properties["ServiceToken"];
|
|
30821
|
-
if (!serviceToken) throw new ProvisioningError(`ServiceToken is required for custom resource ${logicalId}`, resourceType, logicalId);
|
|
30822
|
-
if (typeof serviceToken !== "string") throw new ProvisioningError(`Custom Resource ${logicalId}: ServiceToken is not a resolved string ARN (got ${typeof serviceToken}). This indicates an unresolved value in the template, or, on a rollback, in the resource's recorded state. Check that the template resolves ServiceToken to the provider's Lambda function or SNS topic ARN; a rollback replays the recorded value, so restore the template and re-deploy instead.`, resourceType, logicalId);
|
|
30823
|
-
this.refuseResolvedSecret(logicalId, resourceType, properties);
|
|
30824
|
-
try {
|
|
30825
|
-
const cfnResponse = await this.invokeCustomResourceWithRetry(serviceToken, logicalId, "Create", (invocation) => ({
|
|
30826
|
-
RequestType: "Create",
|
|
30827
|
-
RequestId: invocation.requestId,
|
|
30828
|
-
ResponseURL: invocation.responseURL,
|
|
30829
|
-
ResourceType: resourceType,
|
|
30830
|
-
LogicalResourceId: logicalId,
|
|
30831
|
-
StackId: invocation.stackId,
|
|
30832
|
-
ResourceProperties: this.stringifyProperties(properties)
|
|
30833
|
-
}), maskerOrIdentity(context?.maskSecrets), { properties });
|
|
30834
|
-
if (cfnResponse.Status === "FAILED") throw new Error(`Custom resource handler returned FAILED: ${cfnResponse.Reason || "Unknown reason"}`);
|
|
30835
|
-
const physicalId = respondedPhysicalId(cfnResponse) ?? logicalId;
|
|
30836
|
-
const attributes = cfnResponse.Data || {};
|
|
30837
|
-
this.logger.debug(`Successfully created custom resource ${logicalId}: ${physicalId}`);
|
|
30838
|
-
return {
|
|
30839
|
-
physicalId,
|
|
30840
|
-
attributes,
|
|
30841
|
-
...cfnResponse.NoEcho === true && { noEchoAttributes: true }
|
|
30842
|
-
};
|
|
30843
|
-
} catch (error) {
|
|
30844
|
-
markAuxiliaryFailure(error, logicalId);
|
|
30845
|
-
const cause = error instanceof Error ? error : void 0;
|
|
30846
|
-
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create custom resource ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
30847
|
-
}
|
|
31502
|
+
create(logicalId, resourceType, properties, context) {
|
|
31503
|
+
return create$1.call(this, logicalId, resourceType, properties, context);
|
|
30848
31504
|
}
|
|
30849
|
-
|
|
30850
|
-
|
|
30851
|
-
const serviceToken = properties["ServiceToken"];
|
|
30852
|
-
if (!serviceToken) throw new ProvisioningError(`ServiceToken is required for custom resource ${logicalId}`, resourceType, logicalId, physicalId);
|
|
30853
|
-
if (typeof serviceToken !== "string") throw new ProvisioningError(`Custom Resource ${logicalId}: ServiceToken is not a resolved string ARN (got ${typeof serviceToken}). ` + crUnresolvedTokenUpdateRemedy(), resourceType, logicalId, physicalId);
|
|
30854
|
-
this.refuseResolvedSecret(logicalId, resourceType, properties, physicalId, previousProperties);
|
|
30855
|
-
try {
|
|
30856
|
-
const cfnResponse = await this.invokeCustomResourceWithRetry(serviceToken, logicalId, "Update", (invocation) => ({
|
|
30857
|
-
RequestType: "Update",
|
|
30858
|
-
RequestId: invocation.requestId,
|
|
30859
|
-
ResponseURL: invocation.responseURL,
|
|
30860
|
-
ResourceType: resourceType,
|
|
30861
|
-
LogicalResourceId: logicalId,
|
|
30862
|
-
PhysicalResourceId: physicalId,
|
|
30863
|
-
StackId: invocation.stackId,
|
|
30864
|
-
ResourceProperties: this.stringifyProperties(properties),
|
|
30865
|
-
OldResourceProperties: this.stringifyProperties(previousProperties)
|
|
30866
|
-
}), maskerOrIdentity(context?.maskSecrets), {
|
|
30867
|
-
properties,
|
|
30868
|
-
previousProperties
|
|
30869
|
-
});
|
|
30870
|
-
if (cfnResponse.Status === "FAILED") throw new Error(`Custom resource handler returned FAILED: ${cfnResponse.Reason || "Unknown reason"}`);
|
|
30871
|
-
const newPhysicalId = respondedPhysicalId(cfnResponse) ?? physicalId;
|
|
30872
|
-
const wasReplaced = newPhysicalId !== physicalId;
|
|
30873
|
-
const attributes = cfnResponse.Data || {};
|
|
30874
|
-
this.logger.debug(`Successfully updated custom resource ${logicalId}: ${newPhysicalId}${wasReplaced ? " (replaced)" : ""}`);
|
|
30875
|
-
return {
|
|
30876
|
-
physicalId: newPhysicalId,
|
|
30877
|
-
wasReplaced,
|
|
30878
|
-
attributes,
|
|
30879
|
-
...cfnResponse.NoEcho === true && { noEchoAttributes: true }
|
|
30880
|
-
};
|
|
30881
|
-
} catch (error) {
|
|
30882
|
-
const cause = error instanceof Error ? error : void 0;
|
|
30883
|
-
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update custom resource ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
30884
|
-
}
|
|
31505
|
+
update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
31506
|
+
return update$1.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
30885
31507
|
}
|
|
30886
|
-
|
|
30887
|
-
|
|
30888
|
-
if (!properties) {
|
|
30889
|
-
this.logger.warn(`No properties available for custom resource ${logicalId}, skipping deletion — the handler is never invoked, so anything this custom resource manages is LEFT IN PLACE. Restore the record's properties in state.json and re-run, or tear the resource down by hand. ${DEPLOY_SKIP_CAVEAT}`);
|
|
30890
|
-
return {
|
|
30891
|
-
outcome: "skipped",
|
|
30892
|
-
reason: CR_NO_PROPERTIES_SKIP_REASON
|
|
30893
|
-
};
|
|
30894
|
-
}
|
|
30895
|
-
const serviceToken = properties["ServiceToken"];
|
|
30896
|
-
if (!serviceToken) {
|
|
30897
|
-
this.logger.warn(`No ServiceToken found for custom resource ${logicalId}, skipping deletion — there is no handler to send the Delete request to, so anything this custom resource manages is LEFT IN PLACE. Restore ServiceToken in state.json and re-run, or tear the resource down by hand. ${DEPLOY_SKIP_CAVEAT}`);
|
|
30898
|
-
return {
|
|
30899
|
-
outcome: "skipped",
|
|
30900
|
-
reason: CR_NO_SERVICE_TOKEN_SKIP_REASON
|
|
30901
|
-
};
|
|
30902
|
-
}
|
|
30903
|
-
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; ` + unresolvedTokenDeleteRemedy(context, logicalId), resourceType, logicalId, physicalId);
|
|
30904
|
-
if (carriesSecretMask(serviceToken)) {
|
|
30905
|
-
this.logger.warn(safeMsg`ServiceToken for custom resource ${logicalId} is recorded in state as the redaction ` + safeMsg`mask '${"***"}' (a NoEcho value this resource reads equals, or is contained ` + "in, its ServiceToken), so cdkd cannot address the handler; skipping deletion — anything this custom resource manages is LEFT IN PLACE. Re-deploying does not repair the record while that attribute still carries the value. " + safeMsg`${unaddressableServiceTokenRemedy(context, logicalId)}`);
|
|
30906
|
-
return {
|
|
30907
|
-
outcome: "skipped",
|
|
30908
|
-
reason: CR_MASKED_SERVICE_TOKEN_SKIP_REASON
|
|
30909
|
-
};
|
|
30910
|
-
}
|
|
30911
|
-
if (dynamicReferenceTokens(serviceToken).length > 0) {
|
|
30912
|
-
this.logger.warn(safeMsg`ServiceToken for custom resource ${logicalId} is recorded in state as a ` + "'{{resolve:...}}' dynamic reference, which cdkd does not resolve on delete, so it cannot address the handler; skipping deletion — anything this custom resource manages is LEFT IN PLACE. CloudFormation does not support secure (secretsmanager / ssm-secure) dynamic references in custom resources, and cdkd now refuses such a template at deploy time. " + safeMsg`${unaddressableServiceTokenRemedy(context, logicalId)}`);
|
|
30913
|
-
return {
|
|
30914
|
-
outcome: "skipped",
|
|
30915
|
-
reason: CR_REFERENCE_SERVICE_TOKEN_SKIP_REASON
|
|
30916
|
-
};
|
|
30917
|
-
}
|
|
30918
|
-
const reresolved = context?.noEchoDeleteValues;
|
|
30919
|
-
const { payload, unresolved } = applyNoEchoDeleteValues(properties, context?.recordedNoEchoLeaves, reresolved);
|
|
30920
|
-
if (unresolved.length > 0) {
|
|
30921
|
-
const maskedNoEchoPaths = unresolved.map((coordinate) => coordinate.join("."));
|
|
30922
|
-
this.logger.warn(safeMsg`Custom resource ${logicalId} is recorded in state with ${maskedNoEchoPaths.join(", ")} ` + `holding the '***' mask of a NoEcho value (a NoEcho parameter, or an attribute declared NoEcho), which cdkd does not keep, so its handler would receive the mask in ResourceProperties; skipping deletion — the handler is not invoked, so anything this custom resource manages is LEFT IN PLACE. ${NOECHO_RERESOLUTION_BOUND} ` + safeMsg`${noEchoPropertiesRemedy(context, logicalId)}`);
|
|
30923
|
-
return {
|
|
30924
|
-
outcome: "skipped",
|
|
30925
|
-
reason: CR_NOECHO_PROPERTIES_SKIP_REASON
|
|
30926
|
-
};
|
|
30927
|
-
}
|
|
30928
|
-
if (carriesSecretMask(payload)) {
|
|
30929
|
-
this.logger.warn(safeMsg`Custom resource ${logicalId} is recorded in state with a property holding the ` + "'***' redaction mask, which no NoEcho coordinate of the record names, so cdkd cannot re-resolve it and its handler would receive the mask in ResourceProperties; skipping deletion — the handler is not invoked, so anything this custom resource manages is LEFT IN PLACE. For a record 'cdkd import' or 'cdkd scrub' wrote, a 'cdkd deploy' of the app first records which positions hold a NoEcho value, after which 'cdkd destroy' sends the delete. " + safeMsg`${noEchoPropertiesRemedy(context, logicalId)}`);
|
|
30930
|
-
return {
|
|
30931
|
-
outcome: "skipped",
|
|
30932
|
-
reason: CR_MASKED_PROPERTIES_SKIP_REASON
|
|
30933
|
-
};
|
|
30934
|
-
}
|
|
30935
|
-
const deleteMask = deletePathMasker(context?.maskSecrets, payload === properties ? void 0 : reresolved?.maskSecrets);
|
|
30936
|
-
const show = (text) => deleteMask === void 0 ? text : deleteMask(text);
|
|
30937
|
-
if (!this.isSnsServiceToken(serviceToken) && await this.isBackingLambdaGone(serviceToken)) {
|
|
30938
|
-
if (context?.stackDestroy === true) {
|
|
30939
|
-
this.logger.warn(safeMsg`Backing Lambda for custom resource ${logicalId} no longer exists (${serviceToken}), so ` + "its Delete handler cannot be invoked and cdkd cannot confirm the resource was deleted; skipping deletion — anything this custom resource manages may still be LIVE. cdkd is KEEPING the state record and the run exits non-zero, as CloudFormation leaves such a stack DELETE_FAILED. A re-run skips it again unless a function with that exact ARN exists again (e.g. a shared provider stack destroyed before this one, then redeployed). Otherwise confirm by hand that whatever it manages is gone (or tear it down), then drop the record with " + safeMsg`${stateOrphanRecordRemedy(context, logicalId)}.`);
|
|
30940
|
-
return {
|
|
30941
|
-
outcome: "skipped",
|
|
30942
|
-
reason: CR_BACKING_LAMBDA_GONE_SKIP_REASON
|
|
30943
|
-
};
|
|
30944
|
-
}
|
|
30945
|
-
this.logger.warn(safeMsg`Backing Lambda for custom resource ${logicalId} no longer exists (${serviceToken}); ` + "treating the custom resource as already deleted and DROPPING its state record, as CloudFormation ignores a delete failure in an update's cleanup phase. The handler can never run again, so if its teardown was never PROVEN, whatever it manages may still be LIVE and is now untracked by cdkd. Check for leftovers by hand.");
|
|
30946
|
-
return;
|
|
30947
|
-
}
|
|
30948
|
-
try {
|
|
30949
|
-
const cfnResponse = await this.invokeCustomResourceWithRetry(serviceToken, logicalId, "Delete", (invocation) => ({
|
|
30950
|
-
RequestType: "Delete",
|
|
30951
|
-
RequestId: invocation.requestId,
|
|
30952
|
-
ResponseURL: invocation.responseURL,
|
|
30953
|
-
ResourceType: resourceType,
|
|
30954
|
-
LogicalResourceId: logicalId,
|
|
30955
|
-
PhysicalResourceId: physicalId,
|
|
30956
|
-
StackId: invocation.stackId,
|
|
30957
|
-
ResourceProperties: this.stringifyProperties(payload)
|
|
30958
|
-
}), deleteMask);
|
|
30959
|
-
if (cfnResponse.Status === "FAILED") {
|
|
30960
|
-
this.logger.warn(show(`Custom resource delete handler returned FAILED for ${logicalId}: ${cfnResponse.Reason || "Unknown reason"}. The handler reported that it did NOT delete, so anything this custom resource manages is LEFT IN PLACE${handlerSkipRemedy(context, logicalId)}`));
|
|
30961
|
-
return {
|
|
30962
|
-
outcome: "skipped",
|
|
30963
|
-
reason: CR_DELETE_HANDLER_FAILED_SKIP_REASON
|
|
30964
|
-
};
|
|
30965
|
-
}
|
|
30966
|
-
this.logger.debug(`Successfully deleted custom resource ${logicalId}`);
|
|
30967
|
-
} catch (error) {
|
|
30968
|
-
const failure = describeAwsFailure(error);
|
|
30969
|
-
this.logger.warn(show(`Failed to delete custom resource ${logicalId}, but continuing: ${asSentence(failure.summary)} The Delete handler did not complete, so anything this custom resource manages may still be LIVE${handlerSkipRemedy(context, logicalId)}`));
|
|
30970
|
-
if (failure.redacted) this.logger.debug(show(`Custom resource ${logicalId} delete failure detail: ${failure.detail}`));
|
|
30971
|
-
return {
|
|
30972
|
-
outcome: "skipped",
|
|
30973
|
-
reason: CR_DELETE_INVOKE_FAILED_SKIP_REASON
|
|
30974
|
-
};
|
|
30975
|
-
}
|
|
31508
|
+
delete(logicalId, physicalId, resourceType, properties, context) {
|
|
31509
|
+
return deleteImpl.call(this, logicalId, physicalId, resourceType, properties, context);
|
|
30976
31510
|
}
|
|
30977
31511
|
refuseResolvedSecret(logicalId, resourceType, properties, physicalId, previousProperties) {
|
|
30978
|
-
|
|
30979
|
-
if (!carriesResolvedSecret(secrets)) return;
|
|
30980
|
-
const paths = [...findResolvedSecretPaths(properties, secrets), ...findResolvedSecretPaths(previousProperties, secrets).map((path) => `OldResourceProperties.${path}`)];
|
|
30981
|
-
const where = paths.length > 0 ? paths.join(", ") : "a property (in a form cdkd cannot point to, e.g. base64-encoded or a fragment)";
|
|
30982
|
-
throw markNonRetryable(new ProvisioningError(`Custom resource ${logicalId}: ${where} resolved to the value of a secret (a Secrets Manager secret, or an SSM SecureString parameter -- including one read through a plain {{resolve:ssm:...}} reference or a nested stack parameter). CloudFormation does not support secure dynamic references in custom resources, so cdkd does not send the secret's value to the handler. Pass the secret's name or ARN instead and have the handler read it.`, resourceType, logicalId, physicalId));
|
|
31512
|
+
return refuseResolvedSecret.call(this, logicalId, resourceType, properties, physicalId, previousProperties);
|
|
30983
31513
|
}
|
|
30984
31514
|
isSnsServiceToken(serviceToken) {
|
|
30985
|
-
return
|
|
31515
|
+
return isSnsServiceToken.call(this, serviceToken);
|
|
30986
31516
|
}
|
|
30987
|
-
|
|
30988
|
-
|
|
30989
|
-
await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: serviceToken }));
|
|
30990
|
-
return false;
|
|
30991
|
-
} catch (error) {
|
|
30992
|
-
if (error.name === "ResourceNotFoundException") return true;
|
|
30993
|
-
this.logger.debug(`GetFunction pre-check for ${serviceToken} failed inconclusively (${describeAwsFailure(error).detail}); proceeding with the normal delete invoke`);
|
|
30994
|
-
return false;
|
|
30995
|
-
}
|
|
31517
|
+
isBackingLambdaGone(serviceToken) {
|
|
31518
|
+
return isBackingLambdaGone.call(this, serviceToken);
|
|
30996
31519
|
}
|
|
30997
|
-
|
|
30998
|
-
|
|
30999
|
-
const shown = (text) => mask === void 0 ? text : mask(text);
|
|
31000
|
-
try {
|
|
31001
|
-
const stackId = await this.resolveSyntheticStackId(logicalId, operation, watch);
|
|
31002
|
-
if (referenced !== void 0) await this.waitForReferencedLambdasActive(logicalId, serviceToken, referenced.properties, referenced.previousProperties, watch, mask);
|
|
31003
|
-
let preDeliveryRetries = 0;
|
|
31004
|
-
let failedResponseRetries = 0;
|
|
31005
|
-
for (let attempt = 0;; attempt++) {
|
|
31006
|
-
let delivered = false;
|
|
31007
|
-
let cfnResponse;
|
|
31008
|
-
let logResult;
|
|
31009
|
-
let invocation;
|
|
31010
|
-
try {
|
|
31011
|
-
invocation = await this.prepareInvocation(logicalId, watch, mask);
|
|
31012
|
-
const request = buildRequest({
|
|
31013
|
-
...invocation,
|
|
31014
|
-
stackId
|
|
31015
|
-
});
|
|
31016
|
-
this.logger.debug(`Sending custom resource ${operation.toLowerCase()} request: ${serviceToken}`);
|
|
31017
|
-
const sent = await this.sendRequest(serviceToken, request, invocation.responseKey, logicalId, operation, () => {
|
|
31018
|
-
delivered = true;
|
|
31019
|
-
}, mask);
|
|
31020
|
-
cfnResponse = sent.response;
|
|
31021
|
-
logResult = sent.logResult;
|
|
31022
|
-
} catch (error) {
|
|
31023
|
-
if (delivered || preDeliveryRetries >= this.preDeliveryAuthzMaxRetries || !this.isTransientAuthzThrow(error)) throw error;
|
|
31024
|
-
const delayMs = Math.min(250 * Math.pow(2, preDeliveryRetries), IAM_PROPAGATION_MAX_DELAY_MS);
|
|
31025
|
-
const failure = describeAwsFailure(error);
|
|
31026
|
-
this.logger.warn(`Custom resource ${operation} for ${logicalId} hit a transient IAM-authorization error before the request was delivered (attempt ${attempt + 1}/${this.preDeliveryAuthzMaxRetries + 1}): ${asSentence(this.truncateReason(shown(failure.summary)))} Retrying in ${delayMs / 1e3}s with a fresh response URL and RequestId.`);
|
|
31027
|
-
if (failure.redacted) this.logger.debug(`Custom resource ${operation} for ${logicalId} pre-delivery failure detail: ${shown(failure.detail)}`);
|
|
31028
|
-
if (invocation !== void 0) await this.cleanupResponseObject(invocation.responseKey);
|
|
31029
|
-
preDeliveryRetries += 1;
|
|
31030
|
-
await this.sleepInterruptibly(delayMs, watch);
|
|
31031
|
-
continue;
|
|
31032
|
-
}
|
|
31033
|
-
const reasonIsAuthz = cfnResponse.Status === "FAILED" && this.isTransientAuthzFailure(cfnResponse.Reason);
|
|
31034
|
-
const logTail = cfnResponse.Status === "FAILED" && !reasonIsAuthz ? decodeInvokeLogTail(logResult) : void 0;
|
|
31035
|
-
const logAuthzMatch = logTail === void 0 ? void 0 : this.findTransientAuthzLogLine(logTail);
|
|
31036
|
-
if (cfnResponse.Status === "FAILED" && failedResponseRetries < this.transientAuthzMaxRetries && (reasonIsAuthz || logAuthzMatch !== void 0)) {
|
|
31037
|
-
failedResponseRetries += 1;
|
|
31038
|
-
this.logger.warn(`Custom resource ${operation} for ${logicalId} returned a transient IAM-authorization FAILED (attempt ${attempt + 1}/${this.transientAuthzMaxRetries + 1}): ${this.truncateReason(cfnResponse.Reason === void 0 ? void 0 : shown(cfnResponse.Reason))}. ` + (logAuthzMatch === void 0 ? "" : `The handler's reason carried no authorization wording; the denial was found in the backing function's log: ${this.truncateReason(shown(logAuthzMatch.line))}. `) + `Recycling the backing function's execution environment and retrying so its next cold start picks up the propagated policy.`);
|
|
31039
|
-
await this.recycleBackingFunctionExecEnv(serviceToken, logicalId, mask);
|
|
31040
|
-
continue;
|
|
31041
|
-
}
|
|
31042
|
-
if (cfnResponse.Status === "FAILED" && logAuthzMatch !== void 0) return {
|
|
31043
|
-
...cfnResponse,
|
|
31044
|
-
Reason: `${cfnResponse.Reason ?? "Unknown reason"} [cdkd: the reason carried no authorization wording, but the backing function's invocation log matched the IAM-authorization signal "${logAuthzMatch.signal}" — see the cdkd warning for the log line, or the function's CloudWatch log group]`
|
|
31045
|
-
};
|
|
31046
|
-
if (logTail !== void 0 && hasHandlerLogOutput(logTail)) this.logger.warn(`Custom resource ${operation} for ${logicalId} failed and cdkd could not classify the reason. Log tail from the DISPATCH invocation (for the CDK Provider framework's async pattern the failure may have occurred in a later execution, whose log this is not):\n` + this.truncateReason(shown(logTail), CR_LOG_TAIL_WARN_MAX_CHARS));
|
|
31047
|
-
return cfnResponse;
|
|
31048
|
-
}
|
|
31049
|
-
} finally {
|
|
31050
|
-
watch.dispose();
|
|
31051
|
-
}
|
|
31520
|
+
invokeCustomResourceWithRetry(serviceToken, logicalId, operation, buildRequest, mask, referenced) {
|
|
31521
|
+
return invokeCustomResourceWithRetry.call(this, serviceToken, logicalId, operation, buildRequest, mask, referenced);
|
|
31052
31522
|
}
|
|
31053
31523
|
isTransientAuthzFailure(reason) {
|
|
31054
|
-
|
|
31055
|
-
const lower = reason.toLowerCase();
|
|
31056
|
-
return CR_TRANSIENT_AUTHZ_SIGNALS.some((p) => lower.includes(p));
|
|
31524
|
+
return isTransientAuthzFailure.call(this, reason);
|
|
31057
31525
|
}
|
|
31058
31526
|
isTransientAuthzThrow(error) {
|
|
31059
|
-
|
|
31060
|
-
let current = error;
|
|
31061
|
-
for (let depth = 0; depth < CR_ERROR_CAUSE_MAX_DEPTH && current != null; depth++) {
|
|
31062
|
-
const message = current instanceof Error ? current.message : typeof current === "string" ? current : "";
|
|
31063
|
-
if (message !== "") {
|
|
31064
|
-
const lower = message.toLowerCase();
|
|
31065
|
-
if (isIamPropagationError(message) || CR_THROWN_AUTHZ_EXTRA_SIGNALS.some((p) => lower.includes(p))) return true;
|
|
31066
|
-
}
|
|
31067
|
-
current = current.cause;
|
|
31068
|
-
}
|
|
31069
|
-
return false;
|
|
31527
|
+
return isTransientAuthzThrow.call(this, error);
|
|
31070
31528
|
}
|
|
31071
31529
|
findTransientAuthzLogLine(logTail) {
|
|
31072
|
-
|
|
31073
|
-
for (const line of logTail.split("\n")) {
|
|
31074
|
-
const lower = line.toLowerCase();
|
|
31075
|
-
const signal = CR_TRANSIENT_AUTHZ_LOG_SIGNALS.find((p) => lower.includes(p));
|
|
31076
|
-
if (signal !== void 0) return {
|
|
31077
|
-
line: line.trim(),
|
|
31078
|
-
signal
|
|
31079
|
-
};
|
|
31080
|
-
}
|
|
31530
|
+
return findTransientAuthzLogLine.call(this, logTail);
|
|
31081
31531
|
}
|
|
31082
31532
|
truncateReason(reason, max = 200) {
|
|
31083
|
-
|
|
31084
|
-
return r.length > max ? `${r.slice(0, max)}...` : r;
|
|
31085
|
-
}
|
|
31086
|
-
async recycleBackingFunctionExecEnv(serviceToken, logicalId, mask) {
|
|
31087
|
-
if (this.isSnsServiceToken(serviceToken)) return;
|
|
31088
|
-
const key = recycleFunctionKey(serviceToken);
|
|
31089
|
-
const run = (this.recycleChains.get(key) ?? Promise.resolve()).then(() => this.recycleAndRestore(serviceToken, key, logicalId, mask));
|
|
31090
|
-
const tail = run.catch(() => void 0);
|
|
31091
|
-
this.recycleChains.set(key, tail);
|
|
31092
|
-
try {
|
|
31093
|
-
await run;
|
|
31094
|
-
} finally {
|
|
31095
|
-
if (this.recycleChains.get(key) === tail) this.recycleChains.delete(key);
|
|
31096
|
-
}
|
|
31533
|
+
return truncateReason.call(this, reason, max);
|
|
31097
31534
|
}
|
|
31098
|
-
|
|
31099
|
-
|
|
31100
|
-
const remaining = (cap) => Math.min(cap, Math.floor((deadline - Date.now()) / 1e3));
|
|
31101
|
-
const original = await this.readOriginalDescription(serviceToken, key, logicalId, mask);
|
|
31102
|
-
const rejections = new WaiterRejections();
|
|
31103
|
-
try {
|
|
31104
|
-
await this.lambdaClient.send(new UpdateFunctionConfigurationCommand({
|
|
31105
|
-
FunctionName: serviceToken,
|
|
31106
|
-
Description: `${CR_RECYCLE_DESCRIPTION_PREFIX}${logicalId})`
|
|
31107
|
-
}));
|
|
31108
|
-
} catch (error) {
|
|
31109
|
-
this.logger.debug(safeMsg`Could not recycle backing function for ${logicalId} (${this.describeRecycleFailure(error, rejections, mask)}); retrying invoke without a forced cold start`);
|
|
31110
|
-
return;
|
|
31111
|
-
}
|
|
31112
|
-
try {
|
|
31113
|
-
await this.waitForBackingFunctionUpdated(serviceToken, rejections, remaining(120));
|
|
31114
|
-
} catch (error) {
|
|
31115
|
-
this.logger.debug(safeMsg`Could not recycle backing function for ${logicalId} (${this.describeRecycleFailure(error, rejections, mask)}); retrying invoke without a forced cold start`);
|
|
31116
|
-
this.debugWaiterRejections(logicalId, rejections);
|
|
31117
|
-
}
|
|
31118
|
-
if (original === void 0) {
|
|
31119
|
-
this.logger.debug(safeMsg`Not restoring the backing function's Description for ${logicalId}: its prior value could not be read`);
|
|
31120
|
-
return;
|
|
31121
|
-
}
|
|
31122
|
-
const restoreRejections = new WaiterRejections();
|
|
31123
|
-
for (let attempt = 0;; attempt++) try {
|
|
31124
|
-
await this.lambdaClient.send(new UpdateFunctionConfigurationCommand({
|
|
31125
|
-
FunctionName: serviceToken,
|
|
31126
|
-
Description: original
|
|
31127
|
-
}));
|
|
31128
|
-
break;
|
|
31129
|
-
} catch (error) {
|
|
31130
|
-
const conflictWait = remaining(CR_RECYCLE_RESTORE_CONFLICT_WAIT_SECONDS);
|
|
31131
|
-
if (error instanceof Error && error.name === "ResourceConflictException" && attempt < CR_RECYCLE_RESTORE_CONFLICT_RETRIES && conflictWait >= CR_RECYCLE_MIN_WAIT_SECONDS) {
|
|
31132
|
-
const conflictRejections = new WaiterRejections();
|
|
31133
|
-
try {
|
|
31134
|
-
await this.waitForBackingFunctionUpdated(serviceToken, conflictRejections, conflictWait);
|
|
31135
|
-
} catch {}
|
|
31136
|
-
continue;
|
|
31137
|
-
}
|
|
31138
|
-
this.logger.debug(safeMsg`Could not restore the backing function's Description after the recycle for ${logicalId} (${this.describeRecycleFailure(error, restoreRejections, mask)}); \`cdkd drift\` will report it until the function is next updated`);
|
|
31139
|
-
return;
|
|
31140
|
-
}
|
|
31141
|
-
const settleWait = remaining(120);
|
|
31142
|
-
if (settleWait < CR_RECYCLE_MIN_WAIT_SECONDS) {
|
|
31143
|
-
this.logger.debug(safeMsg`Restored the backing function's Description after the recycle for ${logicalId}, but the recycle's time budget ran out before the update settled`);
|
|
31144
|
-
return;
|
|
31145
|
-
}
|
|
31146
|
-
try {
|
|
31147
|
-
await this.waitForBackingFunctionUpdated(serviceToken, restoreRejections, settleWait);
|
|
31148
|
-
} catch (error) {
|
|
31149
|
-
this.logger.debug(safeMsg`Restored the backing function's Description after the recycle for ${logicalId}, but the update did not settle (${this.describeRecycleFailure(error, restoreRejections, mask)})`);
|
|
31150
|
-
this.debugWaiterRejections(logicalId, restoreRejections);
|
|
31151
|
-
}
|
|
31535
|
+
recycleBackingFunctionExecEnv(serviceToken, logicalId, mask) {
|
|
31536
|
+
return recycleBackingFunctionExecEnv.call(this, serviceToken, logicalId, mask);
|
|
31152
31537
|
}
|
|
31153
|
-
|
|
31154
|
-
|
|
31155
|
-
try {
|
|
31156
|
-
const config = await this.lambdaClient.send(new GetFunctionConfigurationCommand({ FunctionName: serviceToken }));
|
|
31157
|
-
if (config.FunctionName !== void 0) current = config.Description ?? "";
|
|
31158
|
-
} catch (error) {
|
|
31159
|
-
this.logger.debug(safeMsg`Could not read the backing function's Description for ${logicalId} before recycling it (${this.describeRecycleFailure(error, new WaiterRejections(), mask)})`);
|
|
31160
|
-
}
|
|
31161
|
-
if (current !== void 0 && !current.startsWith(CR_RECYCLE_DESCRIPTION_PREFIX)) {
|
|
31162
|
-
this.originalDescriptions.set(key, current);
|
|
31163
|
-
return current;
|
|
31164
|
-
}
|
|
31165
|
-
return this.originalDescriptions.get(key);
|
|
31538
|
+
recycleAndRestore(serviceToken, key, logicalId, mask) {
|
|
31539
|
+
return recycleAndRestore.call(this, serviceToken, key, logicalId, mask);
|
|
31166
31540
|
}
|
|
31167
|
-
|
|
31168
|
-
|
|
31169
|
-
|
|
31170
|
-
|
|
31171
|
-
|
|
31172
|
-
maxDelay: 5
|
|
31173
|
-
}, { FunctionName: serviceToken });
|
|
31541
|
+
readOriginalDescription(serviceToken, key, logicalId, mask) {
|
|
31542
|
+
return readOriginalDescription.call(this, serviceToken, key, logicalId, mask);
|
|
31543
|
+
}
|
|
31544
|
+
waitForBackingFunctionUpdated(serviceToken, rejections, maxWaitTime = 120) {
|
|
31545
|
+
return waitForBackingFunctionUpdated.call(this, serviceToken, rejections, maxWaitTime);
|
|
31174
31546
|
}
|
|
31175
31547
|
describeRecycleFailure(error, rejections, mask) {
|
|
31176
|
-
return
|
|
31548
|
+
return describeRecycleFailure.call(this, error, rejections, mask);
|
|
31177
31549
|
}
|
|
31178
31550
|
debugWaiterRejections(logicalId, rejections) {
|
|
31179
|
-
|
|
31551
|
+
return debugWaiterRejections.call(this, logicalId, rejections);
|
|
31180
31552
|
}
|
|
31181
|
-
|
|
31182
|
-
|
|
31183
|
-
this.logger.debug(`ServiceToken is SNS topic, publishing to: ${serviceToken}`);
|
|
31184
|
-
await this.publishToSns(serviceToken, request);
|
|
31185
|
-
onDelivered();
|
|
31186
|
-
return { response: await this.pollS3Response(responseKey, logicalId, operation) };
|
|
31187
|
-
}
|
|
31188
|
-
await this.waitForBackingLambdaReady(serviceToken, logicalId, mask);
|
|
31189
|
-
const invokeResponse = await this.invokeLambda(serviceToken, request);
|
|
31190
|
-
onDelivered();
|
|
31191
|
-
return {
|
|
31192
|
-
response: await this.getCustomResourceResponse(invokeResponse, responseKey, logicalId, operation, mask),
|
|
31193
|
-
...invokeResponse.LogResult === void 0 ? {} : { logResult: invokeResponse.LogResult }
|
|
31194
|
-
};
|
|
31553
|
+
sendRequest(serviceToken, request, responseKey, logicalId, operation, onDelivered, mask) {
|
|
31554
|
+
return sendRequest.call(this, serviceToken, request, responseKey, logicalId, operation, onDelivered, mask);
|
|
31195
31555
|
}
|
|
31196
|
-
|
|
31197
|
-
|
|
31198
|
-
try {
|
|
31199
|
-
await waitUntilFunctionActiveV2({
|
|
31200
|
-
client: observingLambdaClient(this.lambdaClient, rejections),
|
|
31201
|
-
maxWaitTime: 600,
|
|
31202
|
-
minDelay: 1,
|
|
31203
|
-
maxDelay: 5
|
|
31204
|
-
}, { FunctionName: serviceToken });
|
|
31205
|
-
rejections = new WaiterRejections();
|
|
31206
|
-
await waitUntilFunctionUpdatedV2({
|
|
31207
|
-
client: observingLambdaClient(this.lambdaClient, rejections),
|
|
31208
|
-
maxWaitTime: 600,
|
|
31209
|
-
minDelay: 1,
|
|
31210
|
-
maxDelay: 5
|
|
31211
|
-
}, { FunctionName: serviceToken });
|
|
31212
|
-
} catch (error) {
|
|
31213
|
-
this.debugWaiterRejections(logicalId, rejections);
|
|
31214
|
-
throw markNonRetryable(new Error(`Lambda backing custom resource ${logicalId} (${serviceToken}) did not reach a ready state for Invoke: ${describeWaiterFailure(error, rejections, (line) => this.logger.debug(maskerOrIdentity(mask)(line)))}`, { cause: error }));
|
|
31215
|
-
}
|
|
31216
|
-
}
|
|
31217
|
-
async waitForReferencedLambdasActive(logicalId, serviceToken, properties, previousProperties, watch, mask) {
|
|
31218
|
-
const debug = (line) => this.logger.debug(maskerOrIdentity(mask)(line));
|
|
31219
|
-
const already = new Set(previousProperties === void 0 ? [] : collectReferencedLambdaFunctionArns(previousProperties, serviceToken, Infinity));
|
|
31220
|
-
const fresh = collectReferencedLambdaFunctionArns(properties, serviceToken, Infinity).filter((arn) => !already.has(arn));
|
|
31221
|
-
if (fresh.length > REFERENCED_LAMBDA_MAX_ARNS) debug(safeMsg`${logicalId} references ${fresh.length} Lambda functions; only the first ${REFERENCED_LAMBDA_MAX_ARNS} are waited for`);
|
|
31222
|
-
const arns = fresh.slice(0, REFERENCED_LAMBDA_MAX_ARNS);
|
|
31223
|
-
const deadline = Date.now() + REFERENCED_LAMBDA_MAX_WAIT_SECONDS * 1e3;
|
|
31224
|
-
const abort = new AbortController();
|
|
31225
|
-
const poll = setInterval(() => {
|
|
31226
|
-
if (watch.isInterrupted()) abort.abort();
|
|
31227
|
-
}, 1e3);
|
|
31228
|
-
try {
|
|
31229
|
-
for (const arn of arns) {
|
|
31230
|
-
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31231
|
-
let state;
|
|
31232
|
-
try {
|
|
31233
|
-
state = (await this.lambdaClient.send(new GetFunctionConfigurationCommand({ FunctionName: arn }), { abortSignal: abort.signal })).State;
|
|
31234
|
-
} catch (error) {
|
|
31235
|
-
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31236
|
-
debug(safeMsg`Not waiting for ${arn} referenced by ${logicalId}: ${describeAwsFailure(error).summary}`);
|
|
31237
|
-
continue;
|
|
31238
|
-
}
|
|
31239
|
-
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31240
|
-
if (state !== "Pending") continue;
|
|
31241
|
-
const remainingSeconds = Math.floor((deadline - Date.now()) / 1e3);
|
|
31242
|
-
if (remainingSeconds <= 1) {
|
|
31243
|
-
debug(safeMsg`The wait budget for the functions referenced by ${logicalId} is spent; leaving ${arn} to the handler`);
|
|
31244
|
-
break;
|
|
31245
|
-
}
|
|
31246
|
-
debug(safeMsg`Waiting for ${arn} referenced by ${logicalId} to become Active`);
|
|
31247
|
-
try {
|
|
31248
|
-
await waitForLambdaFunctionActive(this.lambdaClient, arn, abort.signal, remainingSeconds);
|
|
31249
|
-
} catch (error) {
|
|
31250
|
-
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31251
|
-
debug(safeMsg`Referenced function ${arn} of ${logicalId} did not become Active; leaving it to the handler: ${describeAwsFailure(error).summary}`);
|
|
31252
|
-
}
|
|
31253
|
-
}
|
|
31254
|
-
} finally {
|
|
31255
|
-
clearInterval(poll);
|
|
31256
|
-
}
|
|
31556
|
+
waitForBackingLambdaReady(serviceToken, logicalId, mask) {
|
|
31557
|
+
return waitForBackingLambdaReady.call(this, serviceToken, logicalId, mask);
|
|
31257
31558
|
}
|
|
31258
|
-
|
|
31259
|
-
|
|
31260
|
-
TopicArn: topicArn,
|
|
31261
|
-
Message: JSON.stringify(request)
|
|
31262
|
-
}));
|
|
31559
|
+
waitForReferencedLambdasActive(logicalId, serviceToken, properties, previousProperties, watch, mask) {
|
|
31560
|
+
return waitForReferencedLambdasActive.call(this, logicalId, serviceToken, properties, previousProperties, watch, mask);
|
|
31263
31561
|
}
|
|
31264
|
-
|
|
31265
|
-
return
|
|
31266
|
-
FunctionName: serviceToken,
|
|
31267
|
-
InvocationType: "RequestResponse",
|
|
31268
|
-
LogType: "Tail",
|
|
31269
|
-
Payload: Buffer.from(JSON.stringify(request))
|
|
31270
|
-
}));
|
|
31562
|
+
publishToSns(topicArn, request) {
|
|
31563
|
+
return publishToSns.call(this, topicArn, request);
|
|
31271
31564
|
}
|
|
31272
|
-
|
|
31273
|
-
|
|
31274
|
-
const errorPayload = lambdaResponse.Payload ? Buffer.from(lambdaResponse.Payload).toString() : "Unknown";
|
|
31275
|
-
const logTail = decodeInvokeLogTail(lambdaResponse.LogResult);
|
|
31276
|
-
if (logTail !== void 0 && hasHandlerLogOutput(logTail)) this.logger.warn(`Backing function log tail for ${logicalId} (${operation}):\n` + this.truncateReason(mask === void 0 ? logTail : mask(logTail), CR_LOG_TAIL_WARN_MAX_CHARS));
|
|
31277
|
-
throw new Error(`Lambda function error (${lambdaResponse.FunctionError}): ${mask === void 0 ? errorPayload : mask(errorPayload)}`);
|
|
31278
|
-
}
|
|
31279
|
-
let hasDirectPayload = false;
|
|
31280
|
-
try {
|
|
31281
|
-
const payload = parseLambdaPayload(lambdaResponse.Payload, mask);
|
|
31282
|
-
if ("Status" in payload && (payload["Status"] === "SUCCESS" || payload["Status"] === "FAILED")) {
|
|
31283
|
-
this.logger.debug(`Got direct cfn-response from Lambda for ${logicalId}`);
|
|
31284
|
-
await this.cleanupResponseObject(responseKey);
|
|
31285
|
-
return payload;
|
|
31286
|
-
}
|
|
31287
|
-
if (payload.PhysicalResourceId || payload.Data) {
|
|
31288
|
-
this.logger.debug(`Got simple handler response from Lambda for ${logicalId}`);
|
|
31289
|
-
await this.cleanupResponseObject(responseKey);
|
|
31290
|
-
const result = { Status: "SUCCESS" };
|
|
31291
|
-
if (payload.PhysicalResourceId) result.PhysicalResourceId = payload.PhysicalResourceId;
|
|
31292
|
-
if (payload.Data) result.Data = payload.Data;
|
|
31293
|
-
if (payload.NoEcho === true) result.NoEcho = true;
|
|
31294
|
-
return result;
|
|
31295
|
-
}
|
|
31296
|
-
hasDirectPayload = Object.keys(payload).length > 0;
|
|
31297
|
-
} catch {
|
|
31298
|
-
this.logger.debug(`Lambda payload parse failed for ${logicalId}, checking S3 response`);
|
|
31299
|
-
}
|
|
31300
|
-
if (!this.responseBucket) {
|
|
31301
|
-
this.logger.warn(`No response bucket configured for custom resource ${logicalId}. The Lambda handler likely uses cfn-response module which sends to ResponseURL. Configure --state-bucket to enable S3-based response handling.`);
|
|
31302
|
-
return {
|
|
31303
|
-
Status: "SUCCESS",
|
|
31304
|
-
PhysicalResourceId: logicalId
|
|
31305
|
-
};
|
|
31306
|
-
}
|
|
31307
|
-
const isAsyncPattern = !hasDirectPayload;
|
|
31308
|
-
if (isAsyncPattern) this.logger.debug(`Custom resource ${logicalId} uses async Provider framework. Waiting up to ${Math.round(this.asyncResponseTimeoutMs / 6e4)} minutes.`);
|
|
31309
|
-
else this.logger.debug(`Waiting for S3 response from Lambda for ${logicalId} (${operation})`);
|
|
31310
|
-
const timeoutMs = isAsyncPattern ? this.asyncResponseTimeoutMs : this.SYNC_RESPONSE_TIMEOUT_MS;
|
|
31311
|
-
return await this.pollS3Response(responseKey, logicalId, operation, timeoutMs, isAsyncPattern);
|
|
31565
|
+
invokeLambda(serviceToken, request) {
|
|
31566
|
+
return invokeLambda.call(this, serviceToken, request);
|
|
31312
31567
|
}
|
|
31313
|
-
|
|
31314
|
-
|
|
31315
|
-
const responseKey = this.getResponseKey(requestId);
|
|
31316
|
-
return {
|
|
31317
|
-
requestId,
|
|
31318
|
-
responseKey,
|
|
31319
|
-
responseURL: await this.generateResponseURL(responseKey, logicalId, watch, mask)
|
|
31320
|
-
};
|
|
31568
|
+
getCustomResourceResponse(lambdaResponse, responseKey, logicalId, operation, mask) {
|
|
31569
|
+
return getCustomResourceResponse.call(this, lambdaResponse, responseKey, logicalId, operation, mask);
|
|
31321
31570
|
}
|
|
31322
|
-
|
|
31323
|
-
|
|
31324
|
-
let signingEndpoint;
|
|
31325
|
-
try {
|
|
31326
|
-
signingEndpoint = customResourceS3Endpoint();
|
|
31327
|
-
} catch (error) {
|
|
31328
|
-
throw markNonRetryable(error);
|
|
31329
|
-
}
|
|
31330
|
-
await this.ensureResponseClient();
|
|
31331
|
-
const bucket = this.responseBucket;
|
|
31332
|
-
if (this.responsePrefix === "custom-resource-responses") ensureCustomResourceResponseExpirationOnce(this.s3Client, bucket, this.logger);
|
|
31333
|
-
try {
|
|
31334
|
-
await withRetry(() => this.s3Client.send(new PutObjectCommand({
|
|
31335
|
-
Bucket: bucket,
|
|
31336
|
-
Key: responseKey,
|
|
31337
|
-
Body: "",
|
|
31338
|
-
ContentLength: 0,
|
|
31339
|
-
ContentType: "application/json"
|
|
31340
|
-
})), `${logicalId} (custom-resource response placeholder)`, {
|
|
31341
|
-
logger: this.logger,
|
|
31342
|
-
isInterrupted: watch.isInterrupted,
|
|
31343
|
-
onInterrupted: watch.onInterrupted,
|
|
31344
|
-
sleep: customResourceRetryDelays.sleep
|
|
31345
|
-
});
|
|
31346
|
-
} catch (error) {
|
|
31347
|
-
if (error instanceof Error) throw markNonRetryable(error);
|
|
31348
|
-
const failure = describeAwsFailure(error);
|
|
31349
|
-
this.logger.debug(maskerOrIdentity(mask)(`Response placeholder PutObject failure detail: ${failure.detail}`));
|
|
31350
|
-
throw markNonRetryable(new Error(failure.summary));
|
|
31351
|
-
}
|
|
31352
|
-
const command = new PutObjectCommand({
|
|
31353
|
-
Bucket: this.responseBucket,
|
|
31354
|
-
Key: responseKey
|
|
31355
|
-
});
|
|
31356
|
-
let signer = this.s3Client;
|
|
31357
|
-
if (signingEndpoint !== void 0) {
|
|
31358
|
-
signer = await responsePresignClient(this.s3Client, signingEndpoint);
|
|
31359
|
-
this.logger.debug(safeMsg`Signing the custom resource ResponseURL for ${CR_S3_ENDPOINT_ENV} (${signingEndpoint.origin})`);
|
|
31360
|
-
}
|
|
31361
|
-
const presignedUrl = await getSignedUrl(signer, command, { expiresIn: 7200 });
|
|
31362
|
-
this.logger.debug(`Generated pre-signed URL for response: s3://${displaySafe(this.responseBucket, { asciiOnly: true }) || "<unrenderable>"}/${displaySafe(responseKey)}`);
|
|
31363
|
-
return presignedUrl;
|
|
31571
|
+
prepareInvocation(logicalId, watch, mask) {
|
|
31572
|
+
return prepareInvocation.call(this, logicalId, watch, mask);
|
|
31364
31573
|
}
|
|
31365
|
-
|
|
31366
|
-
|
|
31367
|
-
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
const sigintHandler = () => {
|
|
31371
|
-
interrupted = true;
|
|
31372
|
-
};
|
|
31373
|
-
process.on("SIGINT", sigintHandler);
|
|
31374
|
-
try {
|
|
31375
|
-
while (Date.now() - startTime < timeoutMs) {
|
|
31376
|
-
if (interrupted) {
|
|
31377
|
-
await this.cleanupResponseObject(responseKey);
|
|
31378
|
-
process.removeListener("SIGINT", sigintHandler);
|
|
31379
|
-
throw new Error(`Custom resource ${logicalId} interrupted by user`);
|
|
31380
|
-
}
|
|
31381
|
-
pollCount++;
|
|
31382
|
-
try {
|
|
31383
|
-
const body = await (await this.s3Client.send(new GetObjectCommand({
|
|
31384
|
-
Bucket: this.responseBucket,
|
|
31385
|
-
Key: responseKey
|
|
31386
|
-
}))).Body?.transformToString();
|
|
31387
|
-
if (body && body.length > 0) {
|
|
31388
|
-
const parsed = parseCfnResponseBody(body);
|
|
31389
|
-
this.logger.debug(`Got S3 response for ${logicalId}: ${describeCfnResponseBody(body, parsed)}`);
|
|
31390
|
-
if (parsed.kind === "envelope") {
|
|
31391
|
-
const cfnResponse = parsed.response;
|
|
31392
|
-
if (cfnResponse.Status === "SUCCESS" || cfnResponse.Status === "FAILED") {
|
|
31393
|
-
await this.cleanupResponseObject(responseKey);
|
|
31394
|
-
return cfnResponse;
|
|
31395
|
-
}
|
|
31396
|
-
} else this.logger.debug(`S3 response not yet valid JSON for ${logicalId}, retrying...`);
|
|
31397
|
-
}
|
|
31398
|
-
} catch (error) {
|
|
31399
|
-
const err = error;
|
|
31400
|
-
if (err.name !== "NoSuchKey") this.logger.debug(`Error reading S3 response for ${logicalId}: ${err.name}`);
|
|
31401
|
-
}
|
|
31402
|
-
await this.sleep(currentInterval);
|
|
31403
|
-
if (useBackoff) {
|
|
31404
|
-
currentInterval = Math.min(currentInterval * 1.5, this.MAX_POLL_INTERVAL_MS);
|
|
31405
|
-
if (pollCount % 10 === 0) {
|
|
31406
|
-
const elapsedSec = Math.round((Date.now() - startTime) / 1e3);
|
|
31407
|
-
this.logger.info(`Still waiting for async custom resource ${logicalId} (${operation})... ${elapsedSec}s elapsed, polling every ${Math.round(currentInterval / 1e3)}s`);
|
|
31408
|
-
}
|
|
31409
|
-
}
|
|
31410
|
-
}
|
|
31411
|
-
await this.cleanupResponseObject(responseKey);
|
|
31412
|
-
const elapsedMin = Math.round((Date.now() - startTime) / 6e4);
|
|
31413
|
-
throw new Error(`Timeout waiting for custom resource response for ${logicalId} (${operation}) after ${elapsedMin} minutes. ` + (useBackoff ? "The async custom resource handler (Provider framework with isCompleteHandler) did not complete within the timeout. Check the Step Functions execution and isCompleteHandler Lambda logs for errors." : `The Lambda handler may not be sending a response to ResponseURL.`));
|
|
31414
|
-
} finally {
|
|
31415
|
-
process.removeListener("SIGINT", sigintHandler);
|
|
31416
|
-
}
|
|
31574
|
+
generateResponseURL(responseKey, logicalId, watch, mask) {
|
|
31575
|
+
return generateResponseURL.call(this, responseKey, logicalId, watch, mask);
|
|
31576
|
+
}
|
|
31577
|
+
pollS3Response(responseKey, logicalId, operation, timeoutMs = this.SYNC_RESPONSE_TIMEOUT_MS, useBackoff = false) {
|
|
31578
|
+
return pollS3Response.call(this, responseKey, logicalId, operation, timeoutMs, useBackoff);
|
|
31417
31579
|
}
|
|
31418
31580
|
getResponseKey(requestId) {
|
|
31419
|
-
return
|
|
31581
|
+
return getResponseKey.call(this, requestId);
|
|
31420
31582
|
}
|
|
31421
|
-
|
|
31422
|
-
|
|
31423
|
-
const bucket = this.responseBucket;
|
|
31424
|
-
try {
|
|
31425
|
-
await this.s3Client.send(new DeleteObjectCommand({
|
|
31426
|
-
Bucket: bucket,
|
|
31427
|
-
Key: responseKey
|
|
31428
|
-
}));
|
|
31429
|
-
} catch (error) {
|
|
31430
|
-
this.logger.debug(`Failed to delete custom-resource response object s3://${displaySafe(bucket, { asciiOnly: true }) || "<unrenderable>"}/${displaySafe(responseKey)}; it remains as a current object. Underlying error: ${displaySafe(describeAwsFailure(error).detail) || "<unrenderable>"}`);
|
|
31431
|
-
}
|
|
31432
|
-
await purgeNoncurrentKeyVersions(this.s3Client, bucket, [responseKey], {
|
|
31433
|
-
logger: this.logger,
|
|
31434
|
-
objectDescription: CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION
|
|
31435
|
-
});
|
|
31583
|
+
cleanupResponseObject(responseKey) {
|
|
31584
|
+
return cleanupResponseObject.call(this, responseKey);
|
|
31436
31585
|
}
|
|
31437
31586
|
stringifyProperties(properties) {
|
|
31438
|
-
|
|
31439
|
-
for (const [key, value] of Object.entries(properties)) if (typeof value === "boolean") result[key] = String(value);
|
|
31440
|
-
else if (typeof value === "number") result[key] = String(value);
|
|
31441
|
-
else if (typeof value === "object" && value !== null && !Array.isArray(value)) result[key] = this.stringifyProperties(value);
|
|
31442
|
-
else result[key] = value;
|
|
31443
|
-
return result;
|
|
31587
|
+
return stringifyProperties.call(this, properties);
|
|
31444
31588
|
}
|
|
31445
31589
|
sleep(ms) {
|
|
31446
|
-
return
|
|
31590
|
+
return sleep.call(this, ms);
|
|
31447
31591
|
}
|
|
31448
|
-
|
|
31449
|
-
|
|
31450
|
-
while (remaining > 0) {
|
|
31451
|
-
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31452
|
-
const chunk = Math.min(1e3, remaining);
|
|
31453
|
-
await this.sleep(chunk);
|
|
31454
|
-
remaining -= chunk;
|
|
31455
|
-
}
|
|
31456
|
-
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
31592
|
+
sleepInterruptibly(ms, watch) {
|
|
31593
|
+
return sleepInterruptibly.call(this, ms, watch);
|
|
31457
31594
|
}
|
|
31458
|
-
|
|
31459
|
-
|
|
31460
|
-
physicalId: input.knownPhysicalId,
|
|
31461
|
-
attributes: {}
|
|
31462
|
-
};
|
|
31463
|
-
return null;
|
|
31595
|
+
import(input) {
|
|
31596
|
+
return importImpl.call(this, input);
|
|
31464
31597
|
}
|
|
31465
31598
|
};
|
|
31466
31599
|
|
|
@@ -33140,7 +33273,7 @@ const PROPERTY_SHAPES = /* @__PURE__ */ new Map([
|
|
|
33140
33273
|
["AWS::SQS::QueuePolicy", "{\"Queues\":\"array\"}"],
|
|
33141
33274
|
["AWS::SSM::Parameter", "{\"Tags\":\"object\"}"],
|
|
33142
33275
|
["AWS::StepFunctions::StateMachine", "{\"Definition\":\"object\",\"DefinitionS3Location\":\"object\",\"DefinitionSubstitutions\":\"object\",\"EncryptionConfiguration\":\"object\",\"LoggingConfiguration\":\"object\",\"LoggingConfiguration.Destinations\":\"array\",\"LoggingConfiguration.Destinations[]\":\"object\",\"LoggingConfiguration.Destinations[].CloudWatchLogsLogGroup\":\"object\",\"Tags\":\"array\",\"Tags[]\":\"object\",\"TracingConfiguration\":\"object\"}"],
|
|
33143
|
-
["AWS::WAFv2::WebACL", "{\"ApplicationConfig\":\"object\",\"ApplicationConfig.Attributes\":\"array\",\"ApplicationConfig.Attributes[]\":\"object\",\"ApplicationConfig.Attributes[].Values\":\"array\",\"AssociationConfig\":\"object\",\"AssociationConfig.RequestBody\":\"object\",\"CaptchaConfig\":\"object\",\"CaptchaConfig.ImmunityTimeProperty\":\"object\",\"ChallengeConfig\":\"object\",\"ChallengeConfig.ImmunityTimeProperty\":\"object\",\"CustomResponseBodies\":\"object\",\"DataProtectionConfig\":\"object\",\"DataProtectionConfig.DataProtections\":\"array\",\"DataProtectionConfig.DataProtections[]\":\"object\",\"DataProtectionConfig.DataProtections[].Field\":\"object\",\"DataProtectionConfig.DataProtections[].Field.FieldKeys\":\"array\",\"DefaultAction\":\"object\",\"DefaultAction.Allow\":\"object\",\"DefaultAction.Allow.CustomRequestHandling\":\"object\",\"DefaultAction.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"DefaultAction.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"DefaultAction.Block\":\"object\",\"DefaultAction.Block.CustomResponse\":\"object\",\"DefaultAction.Block.CustomResponse.ResponseHeaders\":\"array\",\"DefaultAction.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"MonetizationConfig\":\"object\",\"MonetizationConfig.CryptoConfig\":\"object\",\"MonetizationConfig.CryptoConfig.PaymentNetworks\":\"array\",\"MonetizationConfig.CryptoConfig.PaymentNetworks[]\":\"object\",\"MonetizationConfig.CryptoConfig.PaymentNetworks[].Prices\":\"array\",\"MonetizationConfig.CryptoConfig.PaymentNetworks[].Prices[]\":\"object\",\"OnSourceDDoSProtectionConfig\":\"object\",\"Rules\":\"array\",\"Rules[]\":\"object\",\"Rules[].Action\":\"object\",\"Rules[].Action.Allow\":\"object\",\"Rules[].Action.Allow.CustomRequestHandling\":\"object\",\"Rules[].Action.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Block\":\"object\",\"Rules[].Action.Block.CustomResponse\":\"object\",\"Rules[].Action.Block.CustomResponse.ResponseHeaders\":\"array\",\"Rules[].Action.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"Rules[].Action.Captcha\":\"object\",\"Rules[].Action.Captcha.CustomRequestHandling\":\"object\",\"Rules[].Action.Captcha.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Captcha.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Challenge\":\"object\",\"Rules[].Action.Challenge.CustomRequestHandling\":\"object\",\"Rules[].Action.Challenge.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Challenge.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Count\":\"object\",\"Rules[].Action.Count.CustomRequestHandling\":\"object\",\"Rules[].Action.Count.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Count.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Monetize\":\"object\",\"Rules[].CaptchaConfig\":\"object\",\"Rules[].CaptchaConfig.ImmunityTimeProperty\":\"object\",\"Rules[].ChallengeConfig\":\"object\",\"Rules[].ChallengeConfig.ImmunityTimeProperty\":\"object\",\"Rules[].OverrideAction\":\"object\",\"Rules[].OverrideAction.Count\":\"object\",\"Rules[].OverrideAction.None\":\"object\",\"Rules[].RuleLabels\":\"array\",\"Rules[].RuleLabels[]\":\"object\",\"Rules[].Statement\":\"object\",\"Rules[].Statement.AndStatement\":\"object\",\"Rules[].Statement.AndStatement.Statements\":\"array\",\"Rules[].Statement.AsnMatchStatement\":\"object\",\"Rules[].Statement.AsnMatchStatement.AsnList\":\"array\",\"Rules[].Statement.AsnMatchStatement.ForwardedIPConfig\":\"object\",\"Rules[].Statement.ByteMatchStatement\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.ByteMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.ByteMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.ByteMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.ByteMatchStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.GeoMatchStatement\":\"object\",\"Rules[].Statement.GeoMatchStatement.CountryCodes\":\"array\",\"Rules[].Statement.GeoMatchStatement.ForwardedIPConfig\":\"object\",\"Rules[].Statement.IPSetReferenceStatement\":\"object\",\"Rules[].Statement.IPSetReferenceStatement.IPSetForwardedIPConfig\":\"object\",\"Rules[].Statement.LabelMatchStatement\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ExcludedRules\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ExcludedRules[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.AddressFields\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.AddressFields[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.EmailField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.PasswordField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.PhoneNumberFields\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.PhoneNumberFields[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.UsernameField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.BodyContains\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.BodyContains.FailureStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.BodyContains.SuccessStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Header\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Header.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Header.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Json\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Json.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Json.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.StatusCode\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.StatusCode.FailureCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.StatusCode.SuccessCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.RequestInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.RequestInspection.PasswordField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.RequestInspection.UsernameField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.BodyContains\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.BodyContains.FailureStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.BodyContains.SuccessStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Header\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Header.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Header.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Json\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Json.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Json.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.StatusCode\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.StatusCode.FailureCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.StatusCode.SuccessCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig.Challenge\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig.Challenge.ExemptUriRegularExpressions\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig.Challenge.ExemptUriRegularExpressions[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesBotControlRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].PasswordField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].UsernameField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Monetize\":\"object\",\"Rules[].Statement.NotStatement\":\"object\",\"Rules[].Statement.OrStatement\":\"object\",\"Rules[].Statement.OrStatement.Statements\":\"array\",\"Rules[].Statement.RateBasedStatement\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].ASN\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Cookie\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Cookie.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Cookie.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].ForwardedIP\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].HTTPMethod\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Header\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Header.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Header.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].IP\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].JA3Fingerprint\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].JA4Fingerprint\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].LabelNamespace\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryArgument\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryArgument.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryArgument.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryString\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryString.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryString.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].UriPath\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].UriPath.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].UriPath.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.ForwardedIPConfig\":\"object\",\"Rules[].Statement.RegexMatchStatement\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.RegexMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.RegexMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.RegexMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.RegexMatchStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.TextTransformations\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.ExcludedRules\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.ExcludedRules[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Monetize\":\"object\",\"Rules[].Statement.SizeConstraintStatement\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.SizeConstraintStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.SizeConstraintStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.SizeConstraintStatement.TextTransformations\":\"array\",\"Rules[].Statement.SizeConstraintStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.SqliMatchStatement\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.SqliMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.SqliMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.SqliMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.SqliMatchStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.XssMatchStatement\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.XssMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.XssMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.XssMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.XssMatchStatement.TextTransformations[]\":\"object\",\"Rules[].VisibilityConfig\":\"object\",\"Tags\":\"array\",\"Tags[]\":\"object\",\"TokenDomains\":\"array\",\"VisibilityConfig\":\"object\"}"]
|
|
33276
|
+
["AWS::WAFv2::WebACL", "{\"ApplicationConfig\":\"object\",\"ApplicationConfig.Attributes\":\"array\",\"ApplicationConfig.Attributes[]\":\"object\",\"ApplicationConfig.Attributes[].Values\":\"array\",\"AssociationConfig\":\"object\",\"AssociationConfig.ChallengeJavascriptSdkInjection\":\"object\",\"AssociationConfig.RequestBody\":\"object\",\"CaptchaConfig\":\"object\",\"CaptchaConfig.ImmunityTimeProperty\":\"object\",\"ChallengeConfig\":\"object\",\"ChallengeConfig.ImmunityTimeProperty\":\"object\",\"CustomResponseBodies\":\"object\",\"DataProtectionConfig\":\"object\",\"DataProtectionConfig.DataProtections\":\"array\",\"DataProtectionConfig.DataProtections[]\":\"object\",\"DataProtectionConfig.DataProtections[].Field\":\"object\",\"DataProtectionConfig.DataProtections[].Field.FieldKeys\":\"array\",\"DefaultAction\":\"object\",\"DefaultAction.Allow\":\"object\",\"DefaultAction.Allow.CustomRequestHandling\":\"object\",\"DefaultAction.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"DefaultAction.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"DefaultAction.Block\":\"object\",\"DefaultAction.Block.CustomResponse\":\"object\",\"DefaultAction.Block.CustomResponse.ResponseHeaders\":\"array\",\"DefaultAction.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"MonetizationConfig\":\"object\",\"MonetizationConfig.CryptoConfig\":\"object\",\"MonetizationConfig.CryptoConfig.PaymentNetworks\":\"array\",\"MonetizationConfig.CryptoConfig.PaymentNetworks[]\":\"object\",\"MonetizationConfig.CryptoConfig.PaymentNetworks[].Prices\":\"array\",\"MonetizationConfig.CryptoConfig.PaymentNetworks[].Prices[]\":\"object\",\"OnSourceDDoSProtectionConfig\":\"object\",\"Rules\":\"array\",\"Rules[]\":\"object\",\"Rules[].Action\":\"object\",\"Rules[].Action.Allow\":\"object\",\"Rules[].Action.Allow.CustomRequestHandling\":\"object\",\"Rules[].Action.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Block\":\"object\",\"Rules[].Action.Block.CustomResponse\":\"object\",\"Rules[].Action.Block.CustomResponse.ResponseHeaders\":\"array\",\"Rules[].Action.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"Rules[].Action.Captcha\":\"object\",\"Rules[].Action.Captcha.CustomRequestHandling\":\"object\",\"Rules[].Action.Captcha.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Captcha.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Challenge\":\"object\",\"Rules[].Action.Challenge.CustomRequestHandling\":\"object\",\"Rules[].Action.Challenge.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Challenge.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Count\":\"object\",\"Rules[].Action.Count.CustomRequestHandling\":\"object\",\"Rules[].Action.Count.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Action.Count.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Action.Monetize\":\"object\",\"Rules[].CaptchaConfig\":\"object\",\"Rules[].CaptchaConfig.ImmunityTimeProperty\":\"object\",\"Rules[].ChallengeConfig\":\"object\",\"Rules[].ChallengeConfig.ImmunityTimeProperty\":\"object\",\"Rules[].OverrideAction\":\"object\",\"Rules[].OverrideAction.Count\":\"object\",\"Rules[].OverrideAction.None\":\"object\",\"Rules[].RuleLabels\":\"array\",\"Rules[].RuleLabels[]\":\"object\",\"Rules[].Statement\":\"object\",\"Rules[].Statement.AndStatement\":\"object\",\"Rules[].Statement.AndStatement.Statements\":\"array\",\"Rules[].Statement.AsnMatchStatement\":\"object\",\"Rules[].Statement.AsnMatchStatement.AsnList\":\"array\",\"Rules[].Statement.AsnMatchStatement.ForwardedIPConfig\":\"object\",\"Rules[].Statement.ByteMatchStatement\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.ByteMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.ByteMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.ByteMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.ByteMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.ByteMatchStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.GeoMatchStatement\":\"object\",\"Rules[].Statement.GeoMatchStatement.CountryCodes\":\"array\",\"Rules[].Statement.GeoMatchStatement.ForwardedIPConfig\":\"object\",\"Rules[].Statement.IPSetReferenceStatement\":\"object\",\"Rules[].Statement.IPSetReferenceStatement.IPSetForwardedIPConfig\":\"object\",\"Rules[].Statement.LabelMatchStatement\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ExcludedRules\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ExcludedRules[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.AddressFields\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.AddressFields[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.EmailField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.PasswordField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.PhoneNumberFields\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.PhoneNumberFields[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.RequestInspection.UsernameField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.BodyContains\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.BodyContains.FailureStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.BodyContains.SuccessStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Header\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Header.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Header.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Json\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Json.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.Json.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.StatusCode\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.StatusCode.FailureCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesACFPRuleSet.ResponseInspection.StatusCode.SuccessCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.RequestInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.RequestInspection.PasswordField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.RequestInspection.UsernameField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.BodyContains\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.BodyContains.FailureStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.BodyContains.SuccessStrings\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Header\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Header.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Header.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Json\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Json.FailureValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.Json.SuccessValues\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.StatusCode\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.StatusCode.FailureCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesATPRuleSet.ResponseInspection.StatusCode.SuccessCodes\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig.Challenge\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig.Challenge.ExemptUriRegularExpressions\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesAntiDDoSRuleSet.ClientSideActionConfig.Challenge.ExemptUriRegularExpressions[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].AWSManagedRulesBotControlRuleSet\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].PasswordField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[].UsernameField\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.ManagedRuleGroupStatement.RuleActionOverrides[].ActionToUse.Monetize\":\"object\",\"Rules[].Statement.NotStatement\":\"object\",\"Rules[].Statement.OrStatement\":\"object\",\"Rules[].Statement.OrStatement.Statements\":\"array\",\"Rules[].Statement.RateBasedStatement\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].ASN\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Cookie\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Cookie.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Cookie.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].ForwardedIP\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].HTTPMethod\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Header\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Header.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].Header.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].IP\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].JA3Fingerprint\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].JA4Fingerprint\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].LabelNamespace\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryArgument\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryArgument.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryArgument.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryString\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryString.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].QueryString.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].UriPath\":\"object\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].UriPath.TextTransformations\":\"array\",\"Rules[].Statement.RateBasedStatement.CustomKeys[].UriPath.TextTransformations[]\":\"object\",\"Rules[].Statement.RateBasedStatement.ForwardedIPConfig\":\"object\",\"Rules[].Statement.RegexMatchStatement\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.RegexMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.RegexMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.RegexMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.RegexMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.RegexMatchStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.RegexPatternSetReferenceStatement.TextTransformations\":\"array\",\"Rules[].Statement.RegexPatternSetReferenceStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.ExcludedRules\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.ExcludedRules[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Allow.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Block.CustomResponse.ResponseHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Captcha.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Challenge.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders\":\"array\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Count.CustomRequestHandling.InsertHeaders[]\":\"object\",\"Rules[].Statement.RuleGroupReferenceStatement.RuleActionOverrides[].ActionToUse.Monetize\":\"object\",\"Rules[].Statement.SizeConstraintStatement\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.SizeConstraintStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.SizeConstraintStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.SizeConstraintStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.SizeConstraintStatement.TextTransformations\":\"array\",\"Rules[].Statement.SizeConstraintStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.SqliMatchStatement\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.SqliMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.SqliMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.SqliMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.SqliMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.SqliMatchStatement.TextTransformations[]\":\"object\",\"Rules[].Statement.XssMatchStatement\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.AllQueryArguments\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Body\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.All\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.HeaderOrder\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.All\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JA3Fingerprint\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JA4Fingerprint\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern.All\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths\":\"array\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.Method\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.QueryString\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.SingleHeader\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.SingleQueryArgument\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.UriFragment\":\"object\",\"Rules[].Statement.XssMatchStatement.FieldToMatch.UriPath\":\"object\",\"Rules[].Statement.XssMatchStatement.PreParseTextTransformations\":\"array\",\"Rules[].Statement.XssMatchStatement.PreParseTextTransformations[]\":\"object\",\"Rules[].Statement.XssMatchStatement.TextTransformations\":\"array\",\"Rules[].Statement.XssMatchStatement.TextTransformations[]\":\"object\",\"Rules[].VisibilityConfig\":\"object\",\"Tags\":\"array\",\"Tags[]\":\"object\",\"TokenDomains\":\"array\",\"VisibilityConfig\":\"object\"}"]
|
|
33144
33277
|
]);
|
|
33145
33278
|
|
|
33146
33279
|
// src/provisioning/property-shape.ts
|
|
@@ -34836,6 +34969,103 @@ function preparePropertiesForCcApi(providerRegistry, resourceType, resolvedProps
|
|
|
34836
34969
|
return applyDefaultNameForFallback(logicalId, resourceType, resolvedProps, underivable);
|
|
34837
34970
|
}
|
|
34838
34971
|
|
|
34972
|
+
// src/provisioning/secret-physical-id.ts
|
|
34973
|
+
const APPSYNC_APIKEY_ARN_RESOURCE_PATH = /^apis\/([^/|]+)\/apikeys?\/([^/|]+)$/;
|
|
34974
|
+
const APPSYNC_ARN = /^arn:[^:]+:appsync:[^:]*:[^:]*:(.+)$/;
|
|
34975
|
+
const SUBSTRING_FLOOR = 4;
|
|
34976
|
+
function maskedSecretSegment(segment) {
|
|
34977
|
+
return `****${segment.slice(-4)}`;
|
|
34978
|
+
}
|
|
34979
|
+
function secretPhysicalIdSegment(resourceType, physicalId) {
|
|
34980
|
+
if (resourceType !== "AWS::AppSync::ApiKey") return void 0;
|
|
34981
|
+
if (typeof physicalId !== "string" || physicalId === "") return void 0;
|
|
34982
|
+
const parts = physicalId.split("|");
|
|
34983
|
+
if (parts.length === 2 && parts[0] !== "" && parts[1] !== "") return parts[1];
|
|
34984
|
+
const arn = APPSYNC_ARN.exec(physicalId);
|
|
34985
|
+
const path = arn ? APPSYNC_APIKEY_ARN_RESOURCE_PATH.exec(arn[1]) : null;
|
|
34986
|
+
if (path) return path[2];
|
|
34987
|
+
return physicalId;
|
|
34988
|
+
}
|
|
34989
|
+
function maskSegmentsInText(text, segments) {
|
|
34990
|
+
let out = text;
|
|
34991
|
+
for (const segment of segments) {
|
|
34992
|
+
if (out === segment) return maskedSecretSegment(segment);
|
|
34993
|
+
if (segment.length >= SUBSTRING_FLOOR && out.includes(segment)) out = out.split(segment).join(maskedSecretSegment(segment));
|
|
34994
|
+
}
|
|
34995
|
+
return out;
|
|
34996
|
+
}
|
|
34997
|
+
function displayPhysicalId(resourceType, physicalId) {
|
|
34998
|
+
const segment = secretPhysicalIdSegment(resourceType, physicalId);
|
|
34999
|
+
if (segment === void 0 || typeof physicalId !== "string") return physicalId;
|
|
35000
|
+
return maskSegmentsInText(physicalId, [segment]);
|
|
35001
|
+
}
|
|
35002
|
+
function maskSecretSegmentsDeep(value, segments) {
|
|
35003
|
+
if (segments.length === 0) return value;
|
|
35004
|
+
const ordered = [...new Set(segments)].sort((a, b) => b.length - a.length);
|
|
35005
|
+
const walk = (v) => {
|
|
35006
|
+
if (typeof v === "string") return maskSegmentsInText(v, ordered);
|
|
35007
|
+
if (Array.isArray(v)) return v.map(walk);
|
|
35008
|
+
if (v !== null && typeof v === "object") {
|
|
35009
|
+
const out = {};
|
|
35010
|
+
for (const [k, child] of Object.entries(v)) out[k] = walk(child);
|
|
35011
|
+
return out;
|
|
35012
|
+
}
|
|
35013
|
+
return v;
|
|
35014
|
+
};
|
|
35015
|
+
return walk(value);
|
|
35016
|
+
}
|
|
35017
|
+
function segmentOfRecord(record) {
|
|
35018
|
+
if (record === null || typeof record !== "object") return void 0;
|
|
35019
|
+
const r = record;
|
|
35020
|
+
return secretPhysicalIdSegment(r.resourceType, r.physicalId);
|
|
35021
|
+
}
|
|
35022
|
+
function stringLeavesOf(value, out = []) {
|
|
35023
|
+
if (typeof value === "string") out.push(value);
|
|
35024
|
+
else if (Array.isArray(value)) for (const v of value) stringLeavesOf(v, out);
|
|
35025
|
+
else if (value !== null && typeof value === "object") for (const v of Object.values(value)) stringLeavesOf(v, out);
|
|
35026
|
+
return out;
|
|
35027
|
+
}
|
|
35028
|
+
function secretNamedAttributeLeavesOf$1(record) {
|
|
35029
|
+
if (record === null || typeof record !== "object") return [];
|
|
35030
|
+
const r = record;
|
|
35031
|
+
if (r.resourceType !== "AWS::CloudFormation::Stack") return [];
|
|
35032
|
+
const names = r.secretNamedAttributes;
|
|
35033
|
+
const attributes = r.attributes;
|
|
35034
|
+
if (!Array.isArray(names) || attributes === null || typeof attributes !== "object") return [];
|
|
35035
|
+
const leaves = [];
|
|
35036
|
+
for (const name of names) {
|
|
35037
|
+
if (typeof name !== "string" || !Object.hasOwn(attributes, name)) continue;
|
|
35038
|
+
for (const leaf of stringLeavesOf(attributes[name])) if (leaf !== "" && leaf !== "***" && !leaf.includes("{{resolve:")) leaves.push(leaf);
|
|
35039
|
+
}
|
|
35040
|
+
return leaves;
|
|
35041
|
+
}
|
|
35042
|
+
function secretSegmentsOfState(state) {
|
|
35043
|
+
if (state === null || typeof state !== "object") return [];
|
|
35044
|
+
const s = state;
|
|
35045
|
+
const segments = [];
|
|
35046
|
+
const add = (record) => {
|
|
35047
|
+
const segment = segmentOfRecord(record);
|
|
35048
|
+
if (segment !== void 0) segments.push(segment);
|
|
35049
|
+
};
|
|
35050
|
+
if (s.resources !== null && typeof s.resources === "object" && !Array.isArray(s.resources)) for (const record of Object.values(s.resources)) {
|
|
35051
|
+
add(record);
|
|
35052
|
+
segments.push(...secretNamedAttributeLeavesOf$1(record));
|
|
35053
|
+
}
|
|
35054
|
+
for (const list of [s.orphans, s.supersededResources]) {
|
|
35055
|
+
if (!Array.isArray(list)) continue;
|
|
35056
|
+
for (const entry of list) {
|
|
35057
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
35058
|
+
const record = entry.state;
|
|
35059
|
+
add(record);
|
|
35060
|
+
segments.push(...secretNamedAttributeLeavesOf$1(record));
|
|
35061
|
+
}
|
|
35062
|
+
}
|
|
35063
|
+
return segments;
|
|
35064
|
+
}
|
|
35065
|
+
function withSecretPhysicalIdsMaskedInState(state, segments = secretSegmentsOfState(state)) {
|
|
35066
|
+
return maskSecretSegmentsDeep(state, segments);
|
|
35067
|
+
}
|
|
35068
|
+
|
|
34839
35069
|
// src/provisioning/final-snapshot.ts
|
|
34840
35070
|
const ATOMIC_FINAL_SNAPSHOT_TYPES = /* @__PURE__ */ new Set([
|
|
34841
35071
|
"AWS::RDS::DBInstance",
|
|
@@ -35587,6 +35817,7 @@ function secretNameNeedlesOf(logicalId, record, secrets, options) {
|
|
|
35587
35817
|
const properties = record?.properties;
|
|
35588
35818
|
const path = properties !== null && typeof properties === "object" && Object.hasOwn(properties, "Path") ? properties["Path"] : void 0;
|
|
35589
35819
|
if (physicalId !== void 0 && isSecretDerivedValue(path, mask)) add(physicalId);
|
|
35820
|
+
add(secretPhysicalIdSegment(record?.resourceType, physicalId));
|
|
35590
35821
|
const embedded = options === void 0 ? secrets : options.embedded;
|
|
35591
35822
|
const embeddedBag = embedded !== void 0 && hasMaskableValues(embedded) ? embedded : void 0;
|
|
35592
35823
|
if (embeddedBag !== void 0 && physicalId !== void 0) {
|
|
@@ -37143,7 +37374,7 @@ async function createFirstThenDeleteOld(run, deps, input) {
|
|
|
37143
37374
|
}
|
|
37144
37375
|
if (input.equalIdIsSameResource && createResult.physicalId === currentResource.physicalId) throw markNonRetryable(new CdkdError(maskName(`${displaySafe(logicalId)} (${displaySafe(resourceType)}) requires replacement (${input.trigger}) under a new name, but the create returned the resource being replaced (${displaySafe(currentResource.physicalId)}) instead of a new one, so cdkd cannot tell which name it holds. Nothing was deleted. Delete that resource by hand if it is yours, then re-run the deploy.`), "NAMED_REPLACEMENT_IDEMPOTENT_CREATE"));
|
|
37145
37376
|
if (retainOld) return createResult;
|
|
37146
|
-
deps.logger.info(safeMsg` Deleting old ${logicalId} (${currentResource.physicalId})...`);
|
|
37377
|
+
deps.logger.info(safeMsg` Deleting old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)})...`);
|
|
37147
37378
|
await deleteReplacedAfterCreate(run, deps, logicalId, input.oldResourceType, currentResource, input.deleteProvider, input.deleteProperties, finalSnapshotIdentifier, input.deletePolicy, secrets, input.deleteProvisionedBy, input.noEchoDeleteValues);
|
|
37148
37379
|
return createResult;
|
|
37149
37380
|
}
|
|
@@ -40709,7 +40940,7 @@ async function replayReverseReplacement(s) {
|
|
|
40709
40940
|
survivorReason = `The replacement's new ${op.resourceType} (${current.physicalId}) could not be deleted after the old resource was re-created: ${survivorFailure}${survivorFailure.endsWith(".") ? "" : "."} ` + (recordSuperseded ? `It is live and still billing; ${SUPERSEDED_KEPT_REMEDY}.` : `It is live, still billing, and no longer tracked by cdkd — delete it yourself.`);
|
|
40710
40941
|
result.warnings++;
|
|
40711
40942
|
}
|
|
40712
|
-
const recreatedId = displaySafe(mask(String(createResult.physicalId)));
|
|
40943
|
+
const recreatedId = displaySafe(mask(String(displayPhysicalId(oldType, createResult.physicalId))));
|
|
40713
40944
|
logger.info(mask(adoptedLiveNewResource ? ` Rollback: ${safe(op.logicalId)} adopted the live resource (${recreatedId}) — replacement NOT fully reversed (name-idempotent Create API)` : ` Rollback: ${safe(op.logicalId)} replacement reversed (old resource re-created as ${recreatedId})`));
|
|
40714
40945
|
const survivorProvisionedBy = current.provisionedBy;
|
|
40715
40946
|
ctx.recordEvent?.({
|
|
@@ -53460,7 +53691,7 @@ async function updateByReplacement(engine, { change, counts, currentProps, curre
|
|
|
53460
53691
|
if (retainOld) {
|
|
53461
53692
|
engine.replacementRun.retainedOldOnReplacement.add(logicalId);
|
|
53462
53693
|
await noteRetainedResource(oldResourceType, logicalId);
|
|
53463
|
-
engine.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — ${recreateFlagName} leaves the old physical resource (${currentResource.physicalId}) in place, no longer tracked by cdkd.`);
|
|
53694
|
+
engine.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — ${recreateFlagName} leaves the old physical resource (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) in place, no longer tracked by cdkd.`);
|
|
53464
53695
|
}
|
|
53465
53696
|
createResult = await createFirstThenDeleteOld(engine.replacementRun, engine.replacementDeps(), {
|
|
53466
53697
|
retainOld,
|
|
@@ -53621,9 +53852,9 @@ async function updateByReplacement(engine, { change, counts, currentProps, curre
|
|
|
53621
53852
|
if (deletedOldFirst) {} else if (updateReplacePolicy === "Retain") {
|
|
53622
53853
|
engine.replacementRun.retainedOldOnReplacement.add(logicalId);
|
|
53623
53854
|
await noteRetainedResource(oldResourceType, logicalId);
|
|
53624
|
-
engine.logger.info(safeMsg` Retaining old ${logicalId} (${currentResource.physicalId}) - UpdateReplacePolicy: Retain`);
|
|
53855
|
+
engine.logger.info(safeMsg` Retaining old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) - UpdateReplacePolicy: Retain`);
|
|
53625
53856
|
} else {
|
|
53626
|
-
engine.logger.info(safeMsg` Deleting old ${logicalId} (${currentResource.physicalId})...`);
|
|
53857
|
+
engine.logger.info(safeMsg` Deleting old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)})...`);
|
|
53627
53858
|
let cleanupFinalSnapshotId;
|
|
53628
53859
|
let snapshotBlockedDelete = false;
|
|
53629
53860
|
try {
|
|
@@ -53961,8 +54192,8 @@ async function updateInPlace(engine, { changedProperties, conditions, counts, cu
|
|
|
53961
54192
|
throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create ` + `API is name-idempotent: the create returned the existing resource ` + safeMsg`(${currentResource.physicalId}) instead of creating a new one, and ` + `UpdateReplacePolicy: Retain pins that resource in place, so the new ` + safeMsg`properties were not applied. ${idempotentNameOrigin.descriptor}. ` + safeMsg`${idempotentNameOrigin.remedy} — with Retain, the old resource keeps ` + `the name, so a same-name replacement can never proceed.`, "NAMED_REPLACEMENT_IDEMPOTENT_CREATE"));
|
|
53962
54193
|
}
|
|
53963
54194
|
engine.replacementRun.retainedOldOnReplacement.add(logicalId);
|
|
53964
|
-
engine.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — the old physical ` + safeMsg`resource (${currentResource.physicalId}) is RETAINED and is no longer ` + "tracked by cdkd: it keeps running and incurring cost, and `cdkd destroy` will not remove it. Delete it yourself once you no longer need its data.");
|
|
53965
|
-
retainedSurvivorReason = `UpdateReplacePolicy: Retain kept the old ${resourceType} (${currentResource.physicalId}), now untracked by cdkd`;
|
|
54195
|
+
engine.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — the old physical ` + safeMsg`resource (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) is RETAINED and is no longer ` + "tracked by cdkd: it keeps running and incurring cost, and `cdkd destroy` will not remove it. Delete it yourself once you no longer need its data.");
|
|
54196
|
+
retainedSurvivorReason = `UpdateReplacePolicy: Retain kept the old ${resourceType} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}), now untracked by cdkd`;
|
|
53966
54197
|
}
|
|
53967
54198
|
const replacementResult = {
|
|
53968
54199
|
physicalId: createResult.physicalId,
|
|
@@ -54027,7 +54258,7 @@ async function updateInPlace(engine, { changedProperties, conditions, counts, cu
|
|
|
54027
54258
|
physicalId: result.physicalId,
|
|
54028
54259
|
properties: resolvedProps
|
|
54029
54260
|
});
|
|
54030
|
-
engine.logger.info(safeMsg`Resource ${logicalId} was replaced: ${currentResource.physicalId} -> ${result.physicalId}`);
|
|
54261
|
+
engine.logger.info(safeMsg`Resource ${logicalId} was replaced: ${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)} -> ${displayPhysicalId(resourceType, result.physicalId)}`);
|
|
54031
54262
|
}
|
|
54032
54263
|
const dischargedByReplacement = result.wasReplaced === true && result.physicalId !== currentResource.physicalId;
|
|
54033
54264
|
const keepsParameterRefusal = !dischargedByReplacement && hasUnverifiableParameterRefusal(currentResource);
|
|
@@ -56743,5 +56974,5 @@ function sameGenerationClaimsOf(record) {
|
|
|
56743
56974
|
};
|
|
56744
56975
|
}
|
|
56745
56976
|
|
|
56746
|
-
export { deleteTableWithIndexBusyRetry as $, recordedReferenceRegions as $a, createUnionSecretMasker as $c, stringifyIfAssigned as $i, exportNamesCarriedFrom as $l, nameGenerationCarriedFrom as $n, refuseMalformedResourceEntriesForDestroy as $o, addSuperseded as $r, findReplacedReadersOfRecreateTargets as $s, deleteJournaledOrphans as $t, synthesisStatusMessage as $u, vectorIndexesForCreate as A, reEnableInstanceApiTermination as Aa, sameLambdaFunctionAddress as Ac, utf8ByteLength as Ad, createPreDeleteFinalSnapshot as Ai, recordMaskOnlyValue as Al, equalModuloMarkedMask as An, parameterInputsFor as Ao, formatDestructiveChange as Ar, malformedRenderedContainersWarning as As, isSecretBearingReferenceString as At, validateContainerRepoName as Au, reverseMapTableContributorInsights as B, poisonRenderedSpellingsCollidingIn as Ba, noEchoLeavesOf as Bc, resolveAssemblyPath as Bd, DeploymentEventsReader as Bi, S3StateBackend as Bl, replacementNeverSwapped as Bn, refuseMalformedOrphanRecordsForDestroy as Bo, proposeRenames as Br, withheldAccountClause as Bs, NESTED_PENDING_PARENT_REASON as Bt, getDockerCmd as Bu, isTtlAlreadyDisabled as C, withIndeterminateGuard as Ca, withRetry as Cc, derivePartitionAndUrlSuffix as Cd, secretNamedRecordNeedles as Ci, recoverMaskedOutput as Cl, replayFailedOperations as Cn, AWS_NO_VALUE as Co, isExportAliasCollision as Cr, malformedOutputsWarning as Cs, conditionInputsFrom as Ct, assertAssetBucketRegion as Cu, sendTtlWaitingOutRateLimit as D, isTerminationProtectionPropagationError as Da, emrClusterInstancesReplaced as Dc, processStackMessages as Dd, PRE_DELETE_SNAPSHOT_TYPES as Di, splitGetAttStringForm as Dl, settleUnsettledPrevious as Dn, refStateLookupFromResource as Do, maskingRetryLogger as Dr, repairMalformedOutputsForReadOnly as Ds, enclosingDeadlineRemainingMs as Dt, parseBootstrapMarker as Du, readTtlSpec as E, ec2InstanceProtectionSite as Ea, ecsServiceLaunchTypeSetOrChanged as Ec, StageLoadError as Ed, ATOMIC_FINAL_SNAPSHOT_TYPES as Ei, recordPhysicalNameCopy as El, recordAfterRollbackUpdate as En, lacksRecordedTableArn as Eo, DEFAULT_RESOURCE_WARN_AFTER_MS as Er, refuseMalformedOutputsForDestroy as Es, enclosingDeadlineExpired as Et, isCrossRegionRedirect as Eu, indexDeclaresContributorInsights as F, unsettledItemsOf as Fa, maskAtCoordinates as Fc, ownValue as Fd, earliestDefined as Fi, wholeStringLeavesOf as Fl, isReplacementOrphan as Fn, malformedOrphanRecordsRefusalMessage as Fo, withMovedTo as Fr, refuseMalformedResourcesForExport as Fs, planOrphanAdoption as Ft, describeDockerExecFailure as Fu, beginDeleteWait as G, s3BucketRegionalDomainName as Ga, recordedNoEchoValuesOf as Gc, DBPROXY_TAGS_WHAT as Gi, crossPrefixDeniedWarning as Gl, getCurrentProducerRegions as Gn, isReadableResourceEntry as Go, withStackRecords as Gr, hasReadableResources as Gs, nestedChildStackName as Gt, redactedCause as Gu, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as H, s3BucketArn as Ha, passedNoEchoParametersOf as Hc, injectedAwsRegionValue as Hd, extractDeploymentEventError as Hi, CrossPrefixReadError as Hl, seedsDeleteFirstGuard as Hn, repairMalformedOrphanRecordsForReadOnly as Ho, awaitInFlightSibling as Hr, UNREADABLE_RESOURCES_MAP_ROW as Hs, displacedPhysicalIdShown as Ht, isMalformedEnvKey as Hu, planContributorInsightsOp as I, unsettledPropertiesOf as Ia, maskReadbackAtCoordinates as Ic, absoluteAssemblyPathEscape as Id, ledgerForStack as Ii, WHOLE_DYNAMIC_REFERENCE_PATTERN as Il, planFailedOps as In, malformedOrphanRecordsWarning as Io, isPairableType as Ir, refuseMalformedState as Is, pendingRequestCount as It, describeDockerFailure as Iu, resolveDynamoDbDeleteBudgetClock as J, producerLookupOver as Ja, markSameGenerationBag as Jc, readTagList as Ji, stackInstanceIdOf as Jl, isRedactedRecordedValue as Jn, malformedResourceEntriesWarning as Jo, cyan as Jr, findSdkUnwiredProperties as Js, revertedNestedRowIds as Jt, runDockerStreaming as Ju, compensateRemovedDeletionProtection as K, s3BucketWebsiteUrl as Ka, valueAtCoordinate as Kc, DBPROXY_TAG_OPTIONS as Ki, isAccessDenied$1 as Kl, inheritProducerRegions as Kn, malformedLocalResourceEntriesWarning as Ko, replacedDeleteFailureVerdict as Kr, findActionableSdkUnwired as Ks, recordDisplacedSkips as Kt, redactedDockerCause as Ku, planIndexContributorInsightsOps as L, withUnsettledProperties as La, maskWholeValue as Lc, describeFileReadFailure as Ld, reserveStackCreateToken as Li, isSingleDynamicReferenceToken as Ll, planRollback as Ln, malformedOrphanRowsKeptWarning as Lo, looselyEqual as Lr, repairMalformedResourcesForReadOnly as Ls, resolvePendingCloudControlRequests as Lt, dockerSpawnEnvWithSensitive as Lu, vectorIndexesShapeDetail as M, INTRINSIC_KEYS as Ma, TemplateParser as Mc, hasOwnKey as Md, isFinalSnapshotError as Mi, recordNoEchoAttributeValues as Ml, undeclaredEmptyObservedKeys as Mn, declaresNoEcho as Mo, hintSidesOf as Mr, malformedStateRefusalMessage as Ms, mergeNoChangeOutputs as Mt, buildDockerImage as Mu, CONTRIBUTOR_INSIGHTS_KEY as N, isUsableAttemptedName as Na, canonicalCoordinates as Nc, hasPlainPrototype$1 as Nd, refusesFinalSnapshot as Ni, recordNoEchoParameterFreshValue as Nl, demoteSupersededOrphans as Nn, deployRefusesOrphanRowsReason as No, movedToHint as Nr, refuseMalformedResourcesForDeploy as Ns, makeCanonicalizePropertiesFn as Nt, resolveDockerContextDirectory as Nu, planVectorIndexUpdates as O, observeThenDisableInstanceApiTermination as Oa, canonicalLambdaFunctionName as Oc, describeJsonParseFailure as Od, buildFinalSnapshotIdentifier as Oi, carriesSecretMask as Ol, withUnprovenUnsettled as On, parseWebACLArn as Oo, constructPathOf as Or, STATE_REGION_DIVERGED as Os, withResourceDeadline as Ot, readBootstrapMarkerBody as Ou, contributorInsightsRefusals as P, unsettledItemsField as Pa, isMarkedCoordinate as Pc, nullPrototypeRecord as Pd, unsupportedFinalSnapshotError as Pi, recordProvenPublicExpression as Pl, isJournaledOrphan as Pn, isReadableOrphanRecord as Po, rollbackOrphanIds as Pr, refuseMalformedResourcesForDestroy as Ps, makeSiblingClaimReader as Pt, describeDockerCapturedOutput as Pu, TABLE_INDEX_NOUN as Q, recordedOutputReferenceRegions as Qa, carryLogOnlyValues as Qc, definedAttributes as Qi, describeRegionValueKind as Ql, updatePartialReason as Qn, refuseMalformedResourceEntriesForDeploy as Qo, yellow as Qr, hasNoCloudControlHandlers as Qs, withNestedStackContext as Qt, Synthesizer as Qu, readContributorInsightsSpec as R, withoutUnsettledProperties as Ra, maskedLeafCoordinatesOf as Rc, displayAssemblyPath as Rd, withCreateTokenLedger as Ri, LockManager as Rl, recheckFailedPlan as Rn, previewableOrphanRecords as Ro, mappingPairs as Rr, JSON_LISTING_HOLE_VALUE as Rs, keptForRetainedRecord as Rt, finchSecretArgvRefusal as Ru, setResolvedResourceTimeouts as S, deleteSkipReason as Sa, describeTypeWithThrottleRetry as Sc, canonicalizeRegion as Sd, secretNamedAttributeNamesOf as Si, recordNestedStackParameterExpressions as Sl, refusePendingMovesOut as Sn, keepsSecretReferenceToken as So, collectPublishedOutputNames as Sr, malformedOutputsRefusalMessage as Ss, conditionFingerprint as St, BOOTSTRAP_MARKER_PREFIX as Su, planTimeToLive as T, disableInstanceApiTermination as Ta, dbInstanceEngineChangeIsInPlace as Tc, AssemblyReader as Td, storedSecretNameNeedles as Ti, recordAttributeIdCopy as Tl, removeProtectionTypeList as Tn, isStalePlaceholderArnAttribute as To, DEFAULT_RESOURCE_TIMEOUT_MS as Tr, refuseMalformedOutputs as Ts, readRecordedConditionVerdicts as Tt, getBootstrapMarkerKey as Tu, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as U, s3BucketDomainName as Ua, readbackPathFor as Uc, clearBucketRegionCache as Ud, isRefusedByName as Ui, CrossPrefixScanCache as Ul, orphanNeedsIdentity as Un, unpreviewableOrphanRecords as Uo, destroyStackRecordsView as Ur, displayLogicalId as Us, dropSettledNestedJournals as Ut, partitionSensitiveEnv as Uu, stripIndexContributorInsights as V, isSettledInstanceState as Va, noEchoOutputsComparison as Vc, injectAwsRegion as Vd, DeploymentEventsStore as Vi, rebuildClientForBucketRegion as Vl, resolveReplacementOldType as Vn, refuseMalformedOrphansForOrphan as Vo, refuseRestoreFromItself as Vr, STATE_RESOURCES_MALFORMED as Vs, displacedOpClause as Vt, isDockerClientEnvKey as Vu, DYNAMODB_DELETE_POLL_COST_MS as W, s3BucketDualStackDomainName as Wa, readsNoEchoSource as Wc, resolveBucketRegion as Wd, markDeleteStarted as Wi, applyCrossPrefixScan as Wl, findNestedStackTypeChanges as Wn, unreadableOrphanRecords as Wo, getStackRecords as Wr, hasReadableOutputs as Ws, getNestedRevertRun as Wt, redactDockerArgvValues as Wu, DELETE_INDEX_WAIT_PROCEED_NOTE as X, keepHeldTokenProvenance as Xa, recordReferenceProvenanceEntry as Xc, tagMapAsList as Xi, splitImportedOps as Xl, redactedDeleteAddressSkip as Xn, refuseMalformedResourceAttributesForOrphan as Xo, green as Xr, withoutSdkUnwiredProperties as Xs, collectNestedChildUnaddressed as Xt, AssetManifestLoader as Xu, resolveDynamoDbDeleteBudgetMs as Y, refuseUnreadableCdkCrossAccountRefs as Ya, redactForState as Yc, refuseMalformedDesiredTags as Yi, withStackInstanceIdWithheld as Yl, redactedDeleteAddressFields as Yn, malformedScrubResourceEntriesRefusalMessage as Yo, gray as Yr, unwrittenCreateOnlyReplacement as Ys, withNestedRevertRun as Yt, warnFinchArgvExposure as Yu, INDEX_SETTLE_POLL_INTERVAL_MS as Z, outputReferenceProvenanceOf as Za, snapshotPassProvenance as Zc, tagPlanWarning as Zi, acceptedCreateOnlyDropsOf as Zl, updatePartialMessage as Zn, refuseMalformedResourceEntries as Zo, red as Zr, NO_CC_HANDLERS_REASON as Zs, getCurrentNestedStackContext as Zt, getDockerImageBySourceHash as Zu, streamMemberRefusals as _, unchangedBehindSecretReference as _a, requireConfigArray as _c, uploadCfnTemplate as _d, maskEventTextWithBoundBags as _i, isUncertifiedBaselineMaskPosition as _l, sameMove as _n, getAccountInfo as _o, exportNameNoEchoParameters as _r, refuseMalformedOrphansForDestroy as _s, findNestedTemplateTreeDefect as _t, buildAssetRedirectMap as _u, isProtectionValueActive as a, waitForLambdaFunctionActive as aa, WARM_THROUGHPUT_MEMBERS as ac, resolveCaptureObservedState as ad, supersededHeldByOtherTypeWarning as ai, recordLogOnlyValue as al, makeForeignHolderScan as an, sendableAssumeRoleCommand as ao, withNameGenerationReached as ar, malformedDriftResourcePropertiesWarning as as, hasCdkAutoDeleteTag as at, isReadableBag as au, waitForGoneAfterDelete as b, deleteIndeterminateGuards as ba, prefetchCreateOnlyPropertyPaths as bc, expectedOwnerParam as bd, secretNamePrintingBag as bi, identityKeyFor as bl, pendingMovesOutOf as bn, carriesFetchableDynamicReference as bo, noEchoParameterValueSeed as br, malformedExportSourceWarning as bs, renderNestedTemplateTreeDefect as bt, rewriteTemplateAssetReferences as bu, DynamoDBGlobalTableProvider as c, isCustomResourceType as ca, toCfnInteger as cc, resolveStateBucketWithDefaultAndSource as cd, withoutSuperseded as ci, createSecretMasker as cl, chunks as cn, callerEnvCredentials as co, reachableDivergentParameters as cr, refuseMalformedResourcePropertiesForDrift as cs, markRefusedBeforeApplying as ct, shouldRetainResource as cu, declaredStreamPolicyMember as d, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as da, coerceCfnInteger as dc, warnDeprecatedNoPrefixCliFlag as dd, noEchoExactEchoLeavesOf as di, maskSecretsInText as dl, withApiLimit as dn, classifyReplaySecretRegion as do, displayTextOrWithheld as dr, repairMalformedResourcePropertiesForReadOnly as ds, crossStackOutputProvenanceSource as dt, renderPhaseTimings as du, CC_BROKEN_REASON as ea, shownType as ec, getDefaultStateBucketName as ed, deleteSupersededEntry as ei, hasMaskableValues as el, dropFailedCommands as en, applyRoleArnIfSet as eo, nameGenerationHighWaterOf as er, refuseMalformedResourceEntriesForImport as es, maskedLogger as et, hasReadableExportSet as eu, declaredStreamTagsMember as f, applyCustomResourceResponseExpiration as fa, configBooleanRefusal as fc, ssmResolvedValueType as fd, noEchoParameterNamesOf as fi, scrubResourceRecord as fl, readRefactorMarker as fn, producerRegionsFromState as fo, exportAliasCollisionScrubWarning as fr, UNREADABLE_ORPHANS_CONTAINER_ROW as fs, inheritedProvenanceForChildDiff as ft, timePhase as fu, streamDeclaresTags as g, onlySecretReferencesDiffer as ga, replayWarn as gc, findLargeInlineResources as gd, journaledOrphanPrintingBag as gi, dynamicReferenceTokens as gl, refuseRefactorMarker as gn, parameterTypeMayLoseSecretIdentity as go, carriedExportAliasExposure as gr, refuseMalformedOrphans as gs, childTemplateLoader as gt, WorkGraph as gu, streamDeclaresPolicy as h, slowCcOperationTimeoutMs as ha, readConfigString as hc, MIGRATE_TMP_PREFIX as hd, completedReplayEntries as hi, DYNAMIC_REFERENCE_TOKEN_SCAN as hl, refactorMarkerRefusalMessage as hn, isUnboundTemplateParameter as ho, secretSafeKeyDisplay as hr, malformedOrphansWarning as hs, serviceTokenBlockingReason as ht, stringifyValue as hu, PROTECTION_PROPERTY_BY_TYPE as i, wouldReturnToSdkProvider as ia, renderStatefulReason as ic, resolveAutoAssetStorage as id, supersededAfterRollback as ii, recordLogOnlyParameterValue as il, loadJournaledOrphans as in, isIamRoleArn as io, retiredNameGenerationsLeaving as ir, unreadableResourceEntries as is, S3_AUTO_DELETE_OBJECTS_TAG as it, importableOutputs as iu, vectorIndexesSettled as j, DiffCalculator as ja, DagBuilder as jc, defineOwnKey as jd, effectiveDeletionPolicy as ji, recordMaskOnlyValuesIn as jl, equalModuloMask as jn, passedParameterClassesOf as jo, findRefactorHints as jr, malformedResourcesWarning as js, keptWholeReasonText as jt, buildDenyExternalAccessPolicy as ju, readbackVectorIndexes as k, reDisableInstanceApiTermination as ka, lambdaFunctionNameForMask as kc, parseFailureDebugDetail as kd, ccRoutedFinalSnapshotError as ki, provenPublicValue as kl, calculateResourceDrift as kn, withSharedDrainBudget as ko, findDestructiveChanges as kr, refuseDivergentRecordRegionForDestroy as ks, diffSecurity as kt, validateAssetBucketName as ku, STREAM_POLICY_KEY as l, getCurrentResourceSecrets as la, toFiniteNumber as lc, resolveUseCdkBootstrapAssets as ld, noEchoAttributeNamesOf as li, errorCauseChain as ll, isAccessDeniedError as ln, envCredentialsAreAssumedRole as lo, resourcesNamingDeclaredParameter as lr, refuseMalformedResourcePropertiesForExport as ls, IMPLICIT_DELETE_DEPENDENCIES as lt, stackInstanceIdCarriedFrom as lu, reverseMapStreamPolicy as m, CloudControlProvider as ma, configStringRefusal as mc, CFN_TEMPLATE_URL_LIMIT as md, createReadOnlyAttributeHealerFactory as mi, withoutPhysicalNameCopies as ml, refactorMarkerMovesOf as mn, coerceParameterTypedValue as mo, secretBearingStateKeyWarning as mr, malformedOrphansRefusalMessage as ms, findServiceTokenRefusals as mt, isSensitiveAttributeName as mu, recordedProtectionEvidence as n, ccBrokenReason as na, isStatefulRecreateTargetForReplace as nc, loadCdkJson as nd, isSupersededResourceRecord as ni, logOnlyValueCount as nl, isHandledOrphan as nn, assertSendableRoleArn as no, retiredAfterRollback as nr, refuseMalformedResourceEntriesForOrphan as ns, waitForIndexesSettled as nt, hasUnverifiableParameterRefusal as nu, perType as o, TemplateNoEchoReresolver as oa, coerceWarmThroughput as oc, resolveSkipPrefix as od, supersededHolderOf as oi, shareLogOnlyValues as ol, sameJournaledOrphans as on, AWS_CREDENTIAL_ENV_KEYS as oo, computeParameterTaint as or, malformedResourcePropertiesWarning as os, isTruthyCfnBoolean as ot, orphansAfterRollback as ou, planStreamMemberOps as p, customResourceResponseExpirationWarning as pa, configIntegerRefusal as pc, CFN_TEMPLATE_BODY_LIMIT as pd, withAttemptedItemsMasked as pi, withPhysicalNameCopies as pl, readRefactorMarkerOnce as pn, regionLessSecretName as po, secretBearing as pr, hasReadableOrphans as ps, deferredServiceTokenWarning as pt, AssetPublisher as pu, deleteBudgetKey as q, resolveDynamicReferences as qa, liveMatchesUnresolvedTokenFrame as qc, planTagDiff as qi, isNotImplemented as ql, REDACTED_DELETE_ADDRESS_SKIP_REASON as qn, malformedLocalResourcesWarning as qo, bold as qr, findHandledUnwrittenCreateOnly as qs, revertNestedChildFromJournal as qt, runDockerForeground as qu, recordedProtectionNote as r, isCustomResource as ra, isStatefulRecreateTargetSync as rc, resolveApp as rd, removeSuperseded as ri, printingCorpusOf as rl, journaledOrphanLines as rn, explicitRoleArnOrThrow as ro, retiredNameGenerationsAfter as rr, repairMalformedResourceEntriesForReadOnly as rs, ECR_AUTO_DELETE_IMAGES_TAG as rt, importableOutputKeys as ru, readProtection as s, readsNoEchoDeleteValues as sa, isWarmThroughputDecrease as sc, resolveStateBucketWithDefault as sd, supersededResourcesOf as si, unionOfSecretBags as sl, formatResourceLine as sn, applyCallerIdentityCredentials as so, namesAnyDeclaredParameter as sr, refuseMalformedResourcePropertiesForDestroy as ss, getPriorAttempts as st, orphansCarriedFrom as su, DeployEngine as t, ProviderRegistry as ta, MULTI_REGION_RECREATE_BLOCKED_TYPES as tc, getLegacyStateBucketName as td, holdsSupersededResources as ti, literalSplitDelimitersOf as tl, dropFailedHint as tn, assertFlagRoleArn as to, nameScopeOf as tr, refuseMalformedResourceEntriesForImportSave as ts, relayedIndexBusyDelete as tt, hasReasonlessBaselineRefusal as tu, STREAM_TAGS_KEY as u, withPrintingSecrets as ua, coerceCfnBoolean as uc, stateBucketExistenceConfirmed as ud, noEchoComparisonForTemplate as ui, maskSecretsInError as ul, lookupEachName as un, classifyRecordedSecretRegion as uo, WITHHELD_NAME_DISPLAY as ur, refuseMalformedResourcePropertiesForOrphan as us, computeImplicitDeleteEdges as ut, PhaseClock as uu, streamPolicyMatchesDeclared as v, RollbackInlinePolicyWriters as va, requireConfigObject as vc, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as vd, namingSecretsWithRecordedNoEcho as vi, pathCrossesDottedKey as vl, updateRefactorMarker as vn, isImpossibleEmptyStoredAttribute as vo, exportNameSecretExposure as vr, repairMalformedOrphansForReadOnly as vs, isAbsoluteAssetPath as vt, createAssetRedirectResolver as vu, isTtlRateLimited as w, isWaitAbandonedError as wa, blockDeviceMappingsDifferOnlyInDeleteOnTermination as wc, refuseFailedLookups as wd, stateSecretNameNeedles as wi, physicalNameCopiesOf as wl, replayRollback as wn, cfnRefValueFromPhysicalId as wo, bindingSkippedOutputs as wr, refuseMalformedNestedChildOutputs as ws, parentSuppliedValues as wt, ensureAssetStorage as wu, resolvedResourceTimeoutMs as x, deleteLeftInPlace as xa, templateResourceTypes as xc, PARTITION_TABLE as xd, secretNamePrintingBags as xi, inheritNestedStackParameterAssociations as xl, pendingMovesRefusalMessage as xn, isNamelessDynamicReferenceError as xo, collectDeclaredOutputNames as xr, malformedLocalOutputsWarning as xs, templateIdentity as xt, AssetModeResolver as xu, streamTagsMatchDeclared as y, UNSPECIFIED_SKIP_REASON as ya, requireConfigString as yc, decodeListingKey as yd, orphanRecordsPrintingBag as yi, spelledKeysOf as yl, hasPendingMovesOut as yn, carriesDynamicReference as yo, isWholeDynamicReferenceValue as yr, malformedExportNamesWarning as ys, listNestedTemplateRows as yt, loadPublishableAssetManifest as yu, reverseMapIndexContributorInsights as z, IntrinsicFunctionResolver as za, noEchoCoordinatesOf as zc, renderAssemblyPathEscape as zd, acquireIdempotencyToken as zi, isLockInfoExpired as zl, recordUnderIdIsNotOwn as zn, refuseMalformedOrphanRecords as zo, parseMappingFile as zr, accountArgs as zs, recordRetainedForReadoption as zt, formatDockerLoginError as zu };
|
|
56747
|
-
//# sourceMappingURL=deploy-engine-
|
|
56977
|
+
export { deleteTableWithIndexBusyRetry as $, refuseUnreadableCdkCrossAccountRefs as $a, redactForState as $c, refuseMalformedDesiredTags as $i, withStackInstanceIdWithheld as $l, nameGenerationCarriedFrom as $n, malformedScrubResourceEntriesRefusalMessage as $o, addSuperseded as $r, unwrittenCreateOnlyReplacement as $s, deleteJournaledOrphans as $t, warnFinchArgvExposure as $u, vectorIndexesForCreate as A, ec2InstanceProtectionSite as Aa, ecsServiceLaunchTypeSetOrChanged as Ac, StageLoadError as Ad, createPreDeleteFinalSnapshot as Ai, recordPhysicalNameCopy as Al, equalModuloMarkedMask as An, lacksRecordedTableArn as Ao, formatDestructiveChange as Ar, refuseMalformedOutputsForDestroy as As, isSecretBearingReferenceString as At, isCrossRegionRedirect as Au, reverseMapTableContributorInsights as B, unsettledPropertiesOf as Ba, maskReadbackAtCoordinates as Bc, absoluteAssemblyPathEscape as Bd, ledgerForStack as Bi, WHOLE_DYNAMIC_REFERENCE_PATTERN as Bl, replacementNeverSwapped as Bn, malformedOrphanRecordsWarning as Bo, proposeRenames as Br, refuseMalformedState as Bs, NESTED_PENDING_PARENT_REASON as Bt, describeDockerFailure as Bu, isTtlAlreadyDisabled as C, UNSPECIFIED_SKIP_REASON as Ca, requireConfigString as Cc, decodeListingKey as Cd, secretNamedRecordNeedles as Ci, spelledKeysOf as Cl, replayFailedOperations as Cn, carriesDynamicReference as Co, isExportAliasCollision as Cr, malformedExportNamesWarning as Cs, conditionInputsFrom as Ct, loadPublishableAssetManifest as Cu, sendTtlWaitingOutRateLimit as D, withIndeterminateGuard as Da, withRetry as Dc, derivePartitionAndUrlSuffix as Dd, PRE_DELETE_SNAPSHOT_TYPES as Di, recoverMaskedOutput as Dl, settleUnsettledPrevious as Dn, AWS_NO_VALUE as Do, maskingRetryLogger as Dr, malformedOutputsWarning as Ds, enclosingDeadlineRemainingMs as Dt, assertAssetBucketRegion as Du, readTtlSpec as E, deleteSkipReason as Ea, describeTypeWithThrottleRetry as Ec, canonicalizeRegion as Ed, ATOMIC_FINAL_SNAPSHOT_TYPES as Ei, recordNestedStackParameterExpressions as El, recordAfterRollbackUpdate as En, keepsSecretReferenceToken as Eo, DEFAULT_RESOURCE_WARN_AFTER_MS as Er, malformedOutputsRefusalMessage as Es, enclosingDeadlineExpired as Et, BOOTSTRAP_MARKER_PREFIX as Eu, indexDeclaresContributorInsights as F, DiffCalculator as Fa, DagBuilder as Fc, defineOwnKey as Fd, APPSYNC_APIKEY_ARN_RESOURCE_PATH as Fi, recordMaskOnlyValuesIn as Fl, isReplacementOrphan as Fn, passedParameterClassesOf as Fo, withMovedTo as Fr, malformedResourcesWarning as Fs, planOrphanAdoption as Ft, buildDenyExternalAccessPolicy as Fu, beginDeleteWait as G, isSettledInstanceState as Ga, noEchoOutputsComparison as Gc, injectAwsRegion as Gd, DeploymentEventsStore as Gi, rebuildClientForBucketRegion as Gl, getCurrentProducerRegions as Gn, refuseMalformedOrphansForOrphan as Go, withStackRecords as Gr, STATE_RESOURCES_MALFORMED as Gs, nestedChildStackName as Gt, isDockerClientEnvKey as Gu, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as H, withoutUnsettledProperties as Ha, maskedLeafCoordinatesOf as Hc, displayAssemblyPath as Hd, withCreateTokenLedger as Hi, LockManager as Hl, seedsDeleteFirstGuard as Hn, previewableOrphanRecords as Ho, awaitInFlightSibling as Hr, JSON_LISTING_HOLE_VALUE as Hs, displacedPhysicalIdShown as Ht, finchSecretArgvRefusal as Hu, planContributorInsightsOp as I, INTRINSIC_KEYS as Ia, TemplateParser as Ic, hasOwnKey as Id, maskedSecretSegment as Ii, recordNoEchoAttributeValues as Il, planFailedOps as In, declaresNoEcho as Io, isPairableType as Ir, malformedStateRefusalMessage as Is, pendingRequestCount as It, buildDockerImage as Iu, resolveDynamoDbDeleteBudgetClock as J, s3BucketDualStackDomainName as Ja, readsNoEchoSource as Jc, resolveBucketRegion as Jd, markDeleteStarted as Ji, applyCrossPrefixScan as Jl, isRedactedRecordedValue as Jn, unreadableOrphanRecords as Jo, cyan as Jr, hasReadableOutputs as Js, revertedNestedRowIds as Jt, redactDockerArgvValues as Ju, compensateRemovedDeletionProtection as K, s3BucketArn as Ka, passedNoEchoParametersOf as Kc, injectedAwsRegionValue as Kd, extractDeploymentEventError as Ki, CrossPrefixReadError as Kl, inheritProducerRegions as Kn, repairMalformedOrphanRecordsForReadOnly as Ko, replacedDeleteFailureVerdict as Kr, UNREADABLE_RESOURCES_MAP_ROW as Ks, recordDisplacedSkips as Kt, isMalformedEnvKey as Ku, planIndexContributorInsightsOps as L, isUsableAttemptedName as La, canonicalCoordinates as Lc, hasPlainPrototype$1 as Ld, secretSegmentsOfState as Li, recordNoEchoParameterFreshValue as Ll, planRollback as Ln, deployRefusesOrphanRowsReason as Lo, looselyEqual as Lr, refuseMalformedResourcesForDeploy as Ls, resolvePendingCloudControlRequests as Lt, resolveDockerContextDirectory as Lu, vectorIndexesShapeDetail as M, observeThenDisableInstanceApiTermination as Ma, canonicalLambdaFunctionName as Mc, describeJsonParseFailure as Md, isFinalSnapshotError as Mi, carriesSecretMask as Ml, undeclaredEmptyObservedKeys as Mn, parseWebACLArn as Mo, hintSidesOf as Mr, STATE_REGION_DIVERGED as Ms, mergeNoChangeOutputs as Mt, readBootstrapMarkerBody as Mu, CONTRIBUTOR_INSIGHTS_KEY as N, reDisableInstanceApiTermination as Na, lambdaFunctionNameForMask as Nc, parseFailureDebugDetail as Nd, refusesFinalSnapshot as Ni, provenPublicValue as Nl, demoteSupersededOrphans as Nn, withSharedDrainBudget as No, movedToHint as Nr, refuseDivergentRecordRegionForDestroy as Ns, makeCanonicalizePropertiesFn as Nt, validateAssetBucketName as Nu, planVectorIndexUpdates as O, isWaitAbandonedError as Oa, blockDeviceMappingsDifferOnlyInDeleteOnTermination as Oc, refuseFailedLookups as Od, buildFinalSnapshotIdentifier as Oi, physicalNameCopiesOf as Ol, withUnprovenUnsettled as On, cfnRefValueFromPhysicalId as Oo, constructPathOf as Or, refuseMalformedNestedChildOutputs as Os, withResourceDeadline as Ot, ensureAssetStorage as Ou, contributorInsightsRefusals as P, reEnableInstanceApiTermination as Pa, sameLambdaFunctionAddress as Pc, utf8ByteLength as Pd, unsupportedFinalSnapshotError as Pi, recordMaskOnlyValue as Pl, isJournaledOrphan as Pn, parameterInputsFor as Po, rollbackOrphanIds as Pr, malformedRenderedContainersWarning as Ps, makeSiblingClaimReader as Pt, validateContainerRepoName as Pu, TABLE_INDEX_NOUN as Q, producerLookupOver as Qa, markSameGenerationBag as Qc, readTagList as Qi, stackInstanceIdOf as Ql, updatePartialReason as Qn, malformedResourceEntriesWarning as Qo, yellow as Qr, findSdkUnwiredProperties as Qs, withNestedStackContext as Qt, runDockerStreaming as Qu, readContributorInsightsSpec as R, unsettledItemsField as Ra, isMarkedCoordinate as Rc, nullPrototypeRecord as Rd, withSecretPhysicalIdsMaskedInState as Ri, recordProvenPublicExpression as Rl, recheckFailedPlan as Rn, isReadableOrphanRecord as Ro, mappingPairs as Rr, refuseMalformedResourcesForDestroy as Rs, keptForRetainedRecord as Rt, describeDockerCapturedOutput as Ru, setResolvedResourceTimeouts as S, RollbackInlinePolicyWriters as Sa, requireConfigObject as Sc, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Sd, secretNamedAttributeNamesOf as Si, pathCrossesDottedKey as Sl, refusePendingMovesOut as Sn, isImpossibleEmptyStoredAttribute as So, collectPublishedOutputNames as Sr, repairMalformedOrphansForReadOnly as Ss, conditionFingerprint as St, createAssetRedirectResolver as Su, planTimeToLive as T, deleteLeftInPlace as Ta, templateResourceTypes as Tc, PARTITION_TABLE as Td, storedSecretNameNeedles as Ti, inheritNestedStackParameterAssociations as Tl, removeProtectionTypeList as Tn, isNamelessDynamicReferenceError as To, DEFAULT_RESOURCE_TIMEOUT_MS as Tr, malformedLocalOutputsWarning as Ts, readRecordedConditionVerdicts as Tt, AssetModeResolver as Tu, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as U, IntrinsicFunctionResolver as Ua, noEchoCoordinatesOf as Uc, renderAssemblyPathEscape as Ud, acquireIdempotencyToken as Ui, isLockInfoExpired as Ul, orphanNeedsIdentity as Un, refuseMalformedOrphanRecords as Uo, destroyStackRecordsView as Ur, accountArgs as Us, dropSettledNestedJournals as Ut, formatDockerLoginError as Uu, stripIndexContributorInsights as V, withUnsettledProperties as Va, maskWholeValue as Vc, describeFileReadFailure as Vd, reserveStackCreateToken as Vi, isSingleDynamicReferenceToken as Vl, resolveReplacementOldType as Vn, malformedOrphanRowsKeptWarning as Vo, refuseRestoreFromItself as Vr, repairMalformedResourcesForReadOnly as Vs, displacedOpClause as Vt, dockerSpawnEnvWithSensitive as Vu, DYNAMODB_DELETE_POLL_COST_MS as W, poisonRenderedSpellingsCollidingIn as Wa, noEchoLeavesOf as Wc, resolveAssemblyPath as Wd, DeploymentEventsReader as Wi, S3StateBackend as Wl, findNestedStackTypeChanges as Wn, refuseMalformedOrphanRecordsForDestroy as Wo, getStackRecords as Wr, withheldAccountClause as Ws, getNestedRevertRun as Wt, getDockerCmd as Wu, DELETE_INDEX_WAIT_PROCEED_NOTE as X, s3BucketWebsiteUrl as Xa, valueAtCoordinate as Xc, DBPROXY_TAG_OPTIONS as Xi, isAccessDenied$1 as Xl, redactedDeleteAddressSkip as Xn, malformedLocalResourceEntriesWarning as Xo, green as Xr, findActionableSdkUnwired as Xs, collectNestedChildUnaddressed as Xt, redactedDockerCause as Xu, resolveDynamoDbDeleteBudgetMs as Y, s3BucketRegionalDomainName as Ya, recordedNoEchoValuesOf as Yc, DBPROXY_TAGS_WHAT as Yi, crossPrefixDeniedWarning as Yl, redactedDeleteAddressFields as Yn, isReadableResourceEntry as Yo, gray as Yr, hasReadableResources as Ys, withNestedRevertRun as Yt, redactedCause as Yu, INDEX_SETTLE_POLL_INTERVAL_MS as Z, resolveDynamicReferences as Za, liveMatchesUnresolvedTokenFrame as Zc, planTagDiff as Zi, isNotImplemented as Zl, updatePartialMessage as Zn, malformedLocalResourcesWarning as Zo, red as Zr, findHandledUnwrittenCreateOnly as Zs, getCurrentNestedStackContext as Zt, runDockerForeground as Zu, streamMemberRefusals as _, waitForLambdaFunctionActive as _a, configIntegerRefusal as _c, CFN_TEMPLATE_BODY_LIMIT as _d, maskEventTextWithBoundBags as _i, withPhysicalNameCopies as _l, sameMove as _n, regionLessSecretName as _o, exportNameNoEchoParameters as _r, hasReadableOrphans as _s, findNestedTemplateTreeDefect as _t, AssetPublisher as _u, isProtectionValueActive as a, ProviderRegistry as aa, MULTI_REGION_RECREATE_BLOCKED_TYPES as ac, getLegacyStateBucketName as ad, supersededHeldByOtherTypeWarning as ai, literalSplitDelimitersOf as al, makeForeignHolderScan as an, assertFlagRoleArn as ao, withNameGenerationReached as ar, refuseMalformedResourceEntriesForImportSave as as, hasCdkAutoDeleteTag as at, hasReasonlessBaselineRefusal as au, waitForGoneAfterDelete as b, onlySecretReferencesDiffer as ba, replayWarn as bc, findLargeInlineResources as bd, secretNamePrintingBag as bi, dynamicReferenceTokens as bl, pendingMovesOutOf as bn, parameterTypeMayLoseSecretIdentity as bo, noEchoParameterValueSeed as br, refuseMalformedOrphans as bs, renderNestedTemplateTreeDefect as bt, WorkGraph as bu, DynamoDBGlobalTableProvider as c, wouldReturnToSdkProvider as ca, renderStatefulReason as cc, resolveAutoAssetStorage as cd, withoutSuperseded as ci, recordLogOnlyParameterValue as cl, chunks as cn, isIamRoleArn as co, reachableDivergentParameters as cr, unreadableResourceEntries as cs, markRefusedBeforeApplying as ct, importableOutputs as cu, declaredStreamPolicyMember as d, customResourceResponseExpirationWarning as da, isWarmThroughputDecrease as dc, resolveStateBucketWithDefault as dd, noEchoExactEchoLeavesOf as di, unionOfSecretBags as dl, withApiLimit as dn, applyCallerIdentityCredentials as do, displayTextOrWithheld as dr, refuseMalformedResourcePropertiesForDestroy as ds, crossStackOutputProvenanceSource as dt, orphansCarriedFrom as du, tagMapAsList as ea, withoutSdkUnwiredProperties as ec, AssetManifestLoader as ed, deleteSupersededEntry as ei, recordReferenceProvenanceEntry as el, dropFailedCommands as en, keepHeldTokenProvenance as eo, nameGenerationHighWaterOf as er, refuseMalformedResourceAttributesForOrphan as es, maskedLogger as et, splitImportedOps as eu, declaredStreamTagsMember as f, TemplateNoEchoReresolver as fa, toCfnInteger as fc, resolveStateBucketWithDefaultAndSource as fd, noEchoParameterNamesOf as fi, createSecretMasker as fl, readRefactorMarker as fn, callerEnvCredentials as fo, exportAliasCollisionScrubWarning as fr, refuseMalformedResourcePropertiesForDrift as fs, inheritedProvenanceForChildDiff as ft, shouldRetainResource as fu, streamDeclaresTags as g, withPrintingSecrets as ga, configBooleanRefusal as gc, ssmResolvedValueType as gd, journaledOrphanPrintingBag as gi, scrubResourceRecord as gl, refuseRefactorMarker as gn, producerRegionsFromState as go, carriedExportAliasExposure as gr, UNREADABLE_ORPHANS_CONTAINER_ROW as gs, childTemplateLoader as gt, timePhase as gu, streamDeclaresPolicy as h, getCurrentResourceSecrets as ha, coerceCfnInteger as hc, warnDeprecatedNoPrefixCliFlag as hd, completedReplayEntries as hi, maskSecretsInText as hl, refactorMarkerRefusalMessage as hn, classifyReplaySecretRegion as ho, secretSafeKeyDisplay as hr, repairMalformedResourcePropertiesForReadOnly as hs, serviceTokenBlockingReason as ht, renderPhaseTimings as hu, PROTECTION_PROPERTY_BY_TYPE as i, CC_BROKEN_REASON as ia, shownType as ic, getDefaultStateBucketName as id, supersededAfterRollback as ii, hasMaskableValues as il, loadJournaledOrphans as in, applyRoleArnIfSet as io, retiredNameGenerationsLeaving as ir, refuseMalformedResourceEntriesForImport as is, S3_AUTO_DELETE_OBJECTS_TAG as it, hasReadableExportSet as iu, vectorIndexesSettled as j, isTerminationProtectionPropagationError as ja, emrClusterInstancesReplaced as jc, processStackMessages as jd, effectiveDeletionPolicy as ji, splitGetAttStringForm as jl, equalModuloMask as jn, refStateLookupFromResource as jo, findRefactorHints as jr, repairMalformedOutputsForReadOnly as js, keptWholeReasonText as jt, parseBootstrapMarker as ju, readbackVectorIndexes as k, disableInstanceApiTermination as ka, dbInstanceEngineChangeIsInPlace as kc, AssemblyReader as kd, ccRoutedFinalSnapshotError as ki, recordAttributeIdCopy as kl, calculateResourceDrift as kn, isStalePlaceholderArnAttribute as ko, findDestructiveChanges as kr, refuseMalformedOutputs as ks, diffSecurity as kt, getBootstrapMarkerKey as ku, STREAM_POLICY_KEY as l, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as la, WARM_THROUGHPUT_MEMBERS as lc, resolveCaptureObservedState as ld, noEchoAttributeNamesOf as li, recordLogOnlyValue as ll, isAccessDeniedError as ln, sendableAssumeRoleCommand as lo, resourcesNamingDeclaredParameter as lr, malformedDriftResourcePropertiesWarning as ls, IMPLICIT_DELETE_DEPENDENCIES as lt, isReadableBag as lu, reverseMapStreamPolicy as m, isCustomResourceType as ma, coerceCfnBoolean as mc, stateBucketExistenceConfirmed as md, createReadOnlyAttributeHealerFactory as mi, maskSecretsInError as ml, refactorMarkerMovesOf as mn, classifyRecordedSecretRegion as mo, secretBearingStateKeyWarning as mr, refuseMalformedResourcePropertiesForOrphan as ms, findServiceTokenRefusals as mt, PhaseClock as mu, recordedProtectionEvidence as n, definedAttributes as na, hasNoCloudControlHandlers as nc, Synthesizer as nd, isSupersededResourceRecord as ni, carryLogOnlyValues as nl, isHandledOrphan as nn, recordedOutputReferenceRegions as no, retiredAfterRollback as nr, refuseMalformedResourceEntriesForDeploy as ns, waitForIndexesSettled as nt, describeRegionValueKind as nu, perType as o, ccBrokenReason as oa, isStatefulRecreateTargetForReplace as oc, loadCdkJson as od, supersededHolderOf as oi, logOnlyValueCount as ol, sameJournaledOrphans as on, assertSendableRoleArn as oo, computeParameterTaint as or, refuseMalformedResourceEntriesForOrphan as os, isTruthyCfnBoolean as ot, hasUnverifiableParameterRefusal as ou, planStreamMemberOps as p, readsNoEchoDeleteValues as pa, toFiniteNumber as pc, resolveUseCdkBootstrapAssets as pd, withAttemptedItemsMasked as pi, errorCauseChain as pl, readRefactorMarkerOnce as pn, envCredentialsAreAssumedRole as po, secretBearing as pr, refuseMalformedResourcePropertiesForExport as ps, deferredServiceTokenWarning as pt, stackInstanceIdCarriedFrom as pu, deleteBudgetKey as q, s3BucketDomainName as qa, readbackPathFor as qc, clearBucketRegionCache as qd, isRefusedByName as qi, CrossPrefixScanCache as ql, REDACTED_DELETE_ADDRESS_SKIP_REASON as qn, unpreviewableOrphanRecords as qo, bold as qr, displayLogicalId as qs, revertNestedChildFromJournal as qt, partitionSensitiveEnv as qu, recordedProtectionNote as r, stringifyIfAssigned as ra, findReplacedReadersOfRecreateTargets as rc, synthesisStatusMessage as rd, removeSuperseded as ri, createUnionSecretMasker as rl, journaledOrphanLines as rn, recordedReferenceRegions as ro, retiredNameGenerationsAfter as rr, refuseMalformedResourceEntriesForDestroy as rs, ECR_AUTO_DELETE_IMAGES_TAG as rt, exportNamesCarriedFrom as ru, readProtection as s, isCustomResource as sa, isStatefulRecreateTargetSync as sc, resolveApp as sd, supersededResourcesOf as si, printingCorpusOf as sl, formatResourceLine as sn, explicitRoleArnOrThrow as so, namesAnyDeclaredParameter as sr, repairMalformedResourceEntriesForReadOnly as ss, getPriorAttempts as st, importableOutputKeys as su, DeployEngine as t, tagPlanWarning as ta, NO_CC_HANDLERS_REASON as tc, getDockerImageBySourceHash as td, holdsSupersededResources as ti, snapshotPassProvenance as tl, dropFailedHint as tn, outputReferenceProvenanceOf as to, nameScopeOf as tr, refuseMalformedResourceEntries as ts, relayedIndexBusyDelete as tt, acceptedCreateOnlyDropsOf as tu, STREAM_TAGS_KEY as u, applyCustomResourceResponseExpiration as ua, coerceWarmThroughput as uc, resolveSkipPrefix as ud, noEchoComparisonForTemplate as ui, shareLogOnlyValues as ul, lookupEachName as un, AWS_CREDENTIAL_ENV_KEYS as uo, WITHHELD_NAME_DISPLAY as ur, malformedResourcePropertiesWarning as us, computeImplicitDeleteEdges as ut, orphansAfterRollback as uu, streamPolicyMatchesDeclared as v, CloudControlProvider as va, configStringRefusal as vc, CFN_TEMPLATE_URL_LIMIT as vd, namingSecretsWithRecordedNoEcho as vi, withoutPhysicalNameCopies as vl, updateRefactorMarker as vn, coerceParameterTypedValue as vo, exportNameSecretExposure as vr, malformedOrphansRefusalMessage as vs, isAbsoluteAssetPath as vt, isSensitiveAttributeName as vu, isTtlRateLimited as w, deleteIndeterminateGuards as wa, prefetchCreateOnlyPropertyPaths as wc, expectedOwnerParam as wd, stateSecretNameNeedles as wi, identityKeyFor as wl, replayRollback as wn, carriesFetchableDynamicReference as wo, bindingSkippedOutputs as wr, malformedExportSourceWarning as ws, parentSuppliedValues as wt, rewriteTemplateAssetReferences as wu, resolvedResourceTimeoutMs as x, unchangedBehindSecretReference as xa, requireConfigArray as xc, uploadCfnTemplate as xd, secretNamePrintingBags as xi, isUncertifiedBaselineMaskPosition as xl, pendingMovesRefusalMessage as xn, getAccountInfo as xo, collectDeclaredOutputNames as xr, refuseMalformedOrphansForDestroy as xs, templateIdentity as xt, buildAssetRedirectMap as xu, streamTagsMatchDeclared as y, slowCcOperationTimeoutMs as ya, readConfigString as yc, MIGRATE_TMP_PREFIX as yd, orphanRecordsPrintingBag as yi, DYNAMIC_REFERENCE_TOKEN_SCAN as yl, hasPendingMovesOut as yn, isUnboundTemplateParameter as yo, isWholeDynamicReferenceValue as yr, malformedOrphansWarning as ys, listNestedTemplateRows as yt, stringifyValue as yu, reverseMapIndexContributorInsights as z, unsettledItemsOf as za, maskAtCoordinates as zc, ownValue as zd, earliestDefined as zi, wholeStringLeavesOf as zl, recordUnderIdIsNotOwn as zn, malformedOrphanRecordsRefusalMessage as zo, parseMappingFile as zr, refuseMalformedResourcesForExport as zs, recordRetainedForReadoption as zt, describeDockerExecFailure as zu };
|
|
56978
|
+
//# sourceMappingURL=deploy-engine-5GASWIYI.js.map
|