@go-to-k/cdkd 0.301.3 → 0.301.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-Di3xOH3L.js → asg-provider--GY-B-zI.js} +2 -2
- package/dist/{asg-provider-Di3xOH3L.js.map → asg-provider--GY-B-zI.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-CZaafy9R.js → deploy-engine-BIPU9Xdh.js} +1236 -1093
- package/dist/deploy-engine-BIPU9Xdh.js.map +1 -0
- package/dist/iam-policy-targets-BkeM7IXi.js.map +1 -1
- package/dist/{iam-role-provider-De0ZPOAF.js → iam-role-provider-C58oW5zG.js} +5 -4
- package/dist/iam-role-provider-C58oW5zG.js.map +1 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-DTUriVz3.js → neptune-provider-DoKgbZCz.js} +5 -7
- package/dist/neptune-provider-DoKgbZCz.js.map +1 -0
- package/dist/{program-CYtSW-WU.js → program-DYfZCsxM.js} +108 -58
- package/dist/program-DYfZCsxM.js.map +1 -0
- package/dist/{provider-classes-59TTNMFB.js → provider-classes-BSUoljqw.js} +89 -153
- package/dist/provider-classes-BSUoljqw.js.map +1 -0
- package/dist/{rds-provider-Dadp11aB.js → rds-provider-DI_O0_iG.js} +4 -4
- package/dist/rds-provider-DI_O0_iG.js.map +1 -0
- package/dist/{version-Cx2pAgJv.js → version-Bft5jrTk.js} +2 -2
- package/dist/{version-Cx2pAgJv.js.map → version-Bft5jrTk.js.map} +1 -1
- package/package.json +2 -2
- package/dist/deploy-engine-CZaafy9R.js.map +0 -1
- package/dist/iam-role-provider-De0ZPOAF.js.map +0 -1
- package/dist/neptune-provider-DTUriVz3.js.map +0 -1
- package/dist/program-CYtSW-WU.js.map +0 -1
- package/dist/provider-classes-59TTNMFB.js.map +0 -1
- package/dist/rds-provider-Dadp11aB.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { r as getAwsClients, s as __exportAll } from "./aws-clients-B_CEQGE1.js"
|
|
|
2
2
|
import { A as UNRENDERABLE, B as safeMsg, C as looksLikeCdkdGeneratedName, D as SAFE_MSG_ALTERED_CHAR, E as withoutGeneratedFallbackName, F as displaySafe, H as terminalSafe, I as displayStackName, L as isPasteableIdent, N as displayAwsMessage, O as SECRET_REF_MAX_CODE_POINTS, P as displayIdent, S as getCurrentStackName, T as withStackName, U as truncateCodePoints, a as getLogger, b as generateResourceNameWithFallback, d as installLogLineMaskerSource, f as getLiveRenderer, g as applyDefaultNameForFallback, j as asIsMessage, k as STACK_REF_MAX_CODE_POINTS, o as isStdoutReservedForPayload, r as safeStringify$1, t as describeAwsFailure, u as currentLogLineMasker, v as explicitNamePropertyFor, w as withSkipPrefix, x as getCurrentSkipPrefix, y as generateResourceName, z as plainIdentOr } from "./aws-failure-text-BEQfs6za.js";
|
|
3
3
|
import { $ as protectedReplacementAdvice, $t as ambientCredentialConfig, A as isQuotableImportValue, An as SHELL_ACTIVE, At as isAuxiliaryMarkOf, B as isTerminalDeleteFailure, Bn as shellBoundedDisplay, Bt as formatLockOperation, Cn as StateError, Ct as RETRY_AUXILIARY_OWNER, Dn as normalizeAwsError, Dt as createdResourceIdentityBeforeFailure, E as assertRegionMatch, Et as createdBeforeFailure, F as resolveExplicitPhysicalId, Fn as isInertUnquoted, Ft as UNREPRODUCIBLE_LOCK_CLAUSE, G as runDeleteAttempt, Gn as isUpdateUnsupportedError, Gt as DEFAULT_STATE_PREFIX, H as observeThenDisableProtection, Hn as withheldTargetClause, Ht as recoveryCommandFlags, In as pasteableCommand, It as buildForceUnlockCommand, J as DELETION_PROTECTION_DOC_POINTER, Jn as isNameCooldownError, Kn as hasReplayMayCollide, Kt as injectiveKey, L as ProtectionFlipRegistry, Ln as physicalIdShownBesideCommand, M as quotedRemedyLogicalId, Mn as UNSHOWABLE_VALUE, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as commandHole, Ot as hasCreatedBeforeFailure, Pt as replayMadeAnotherResource, Q as pasteableAwsCommand, Qn as markReplayMayCollide, Qt as ambientClientDefaults, R as compensateProtectionFlip, Rn as plainOrDescribed, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, U as protectionFlipKey, Ut as sanitizeRecoveryValue, Vn as shellQuote, Vt as formatLockOwner, Wt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xn as isReplayedNameCollisionFrom, Yn as isRecreateRetryableError, Yt as producerRecordKey, Zt as withPasteableAwsProfile, _t as createMaskedLogSinks, ar as isRetryableTransientError, at as startInterruptWatch, bn as ResourceUpdateNotSupportedError, bt as maskDeep, ct as canonicalizeRoute53QueryName, d as prepareRemovalForUpdate, dr as markNonRetryable, en as clientDefaultsFor, er as formatRetryClassificationSignals, f as removalWarning, fr as markRedactedCause, ft as logicalIdShown, gt as stateOrphanRecordRemedy, hn as MalformedProducerRecordRefusalError, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, ir as isIamPropagationError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jn as SHELL_ACTIVE_WHY, jt as markAuxiliaryFailure, kt as isAuxiliaryFailure, l as withUnchangedSecretPrincipalLists, ln as DynamicReferenceRegionAmbiguousError, lr as isMarkedNonRetryable, m as withoutInjectedRemovals, mn as MacroExpansionError, mt as resourceTypeShown, nn as AccountIdUnavailableError, nr as isAmbiguousOutcomeError, on as CrossAccountSecretRefusalError, or as isTransientServerError, ot as ElapsedBudgetRegistry, pn as LockError, pr as wrapMaskedAwsError, qn as isNameCollisionErrorFrom, rn as AssetError, sn as DependencyError, sr as retryClassificationText, st as monotonicNowMs, tn as credentialFingerprint, tr as isAmbiguousCcHandlerErrorCode, un as IntrinsicResolutionRefusalError, ur as isThrottlingError, ut as compositeIdSeparatorRefusal, vn as ProvisioningError, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, wn as SynthesisError, wt as carryCreatedBeforeFailure, xt as maskerOrIdentity, yn as ResourceTimeoutError, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation, zn as quotedOrDescribed, zt as formatLockExpiry } from "./iam-policy-targets-BkeM7IXi.js";
|
|
4
4
|
import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, s as ambientRegion, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-DBXBcg0J.js";
|
|
5
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { t as getCdkdVersion } from "./version-Bft5jrTk.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";
|
|
@@ -10557,6 +10557,43 @@ function noEchoCoordinatesOf(template, resolved, sources, onCoordinate) {
|
|
|
10557
10557
|
walk(template, resolved, []);
|
|
10558
10558
|
return coordinates;
|
|
10559
10559
|
}
|
|
10560
|
+
function noEchoParameterNodesAt(templateProperties, shape, noEchoParameters, conditions) {
|
|
10561
|
+
const nodes = /* @__PURE__ */ new Map();
|
|
10562
|
+
noEchoCoordinatesOf(templateProperties ?? {}, shape, {
|
|
10563
|
+
parameters: noEchoParameters,
|
|
10564
|
+
...conditions !== void 0 && { conditions }
|
|
10565
|
+
}, (coordinate, node) => nodes.set(canonicalJson$3(coordinate), {
|
|
10566
|
+
coordinate,
|
|
10567
|
+
node
|
|
10568
|
+
}));
|
|
10569
|
+
return nodes;
|
|
10570
|
+
}
|
|
10571
|
+
function recordedNoEchoValuesOf(templateProperties, record, noEchoParameterNames, conditions) {
|
|
10572
|
+
const bag = /* @__PURE__ */ new Map();
|
|
10573
|
+
const properties = record?.properties;
|
|
10574
|
+
if (properties === null || typeof properties !== "object") return bag;
|
|
10575
|
+
const coordinates = /* @__PURE__ */ new Map();
|
|
10576
|
+
if (noEchoParameterNames.size > 0 && templateProperties !== void 0) for (const [key, { coordinate }] of noEchoParameterNodesAt(templateProperties, properties, noEchoParameterNames, conditions)) coordinates.set(key, coordinate);
|
|
10577
|
+
for (const coordinate of noEchoLeavesOf(record ?? {}) ?? []) coordinates.set(canonicalJson$3(coordinate), coordinate);
|
|
10578
|
+
const recordLeaf = (leaf) => {
|
|
10579
|
+
if (typeof leaf === "string") {
|
|
10580
|
+
if (leaf === "***" || leaf.includes("{{resolve:")) return;
|
|
10581
|
+
recordLogOnlyValue(bag, leaf);
|
|
10582
|
+
} else if (typeof leaf === "number") recordLogOnlyValue(bag, String(leaf));
|
|
10583
|
+
};
|
|
10584
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10585
|
+
const walk = (value) => {
|
|
10586
|
+
if (value === null || typeof value !== "object") {
|
|
10587
|
+
recordLeaf(value);
|
|
10588
|
+
return;
|
|
10589
|
+
}
|
|
10590
|
+
if (seen.has(value)) return;
|
|
10591
|
+
seen.add(value);
|
|
10592
|
+
for (const child of Object.values(value)) walk(child);
|
|
10593
|
+
};
|
|
10594
|
+
for (const coordinate of coordinates.values()) walk(valueAtCoordinate(properties, coordinate));
|
|
10595
|
+
return bag;
|
|
10596
|
+
}
|
|
10560
10597
|
function maskWholeValue(value) {
|
|
10561
10598
|
if (value === null || value === void 0) return value;
|
|
10562
10599
|
if (typeof value === "string" && isSingleDynamicReferenceToken(value)) return value;
|
|
@@ -27015,7 +27052,7 @@ var CloudControlProvider = class {
|
|
|
27015
27052
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
27016
27053
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
27017
27054
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
27018
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
27055
|
+
const { ASGProvider } = await import("./asg-provider--GY-B-zI.js");
|
|
27019
27056
|
const delegateRegion = ambientRegion();
|
|
27020
27057
|
let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
|
|
27021
27058
|
if (asgProvider === void 0) {
|
|
@@ -27121,7 +27158,7 @@ var CloudControlProvider = class {
|
|
|
27121
27158
|
const family = SDK_DELETE_FAMILIES.get(resourceType);
|
|
27122
27159
|
const cached = this.sdkDeleteDelegates.get(family);
|
|
27123
27160
|
if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
|
|
27124
|
-
const provider = family === "rds" ? new (await (import("./rds-provider-
|
|
27161
|
+
const provider = family === "rds" ? new (await (import("./rds-provider-DI_O0_iG.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-DoKgbZCz.js"))).NeptuneProvider({ region: ccRegion });
|
|
27125
27162
|
this.sdkDeleteDelegates.set(family, {
|
|
27126
27163
|
region: ccRegion,
|
|
27127
27164
|
provider
|
|
@@ -28280,14 +28317,6 @@ function recordLeaves(bag, value) {
|
|
|
28280
28317
|
}
|
|
28281
28318
|
recordLogOnlyParameterValue(bag, value);
|
|
28282
28319
|
}
|
|
28283
|
-
function templateNodesAt(templateProperties, shape, noEchoParameters, conditions) {
|
|
28284
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
28285
|
-
noEchoCoordinatesOf(templateProperties ?? {}, shape, {
|
|
28286
|
-
parameters: noEchoParameters,
|
|
28287
|
-
...conditions !== void 0 && { conditions }
|
|
28288
|
-
}, (coordinate, node) => nodes.set(canonicalJson$3(coordinate), node));
|
|
28289
|
-
return nodes;
|
|
28290
|
-
}
|
|
28291
28320
|
async function fingerprintsUnchanged(record, templateProperties, coordinate, fingerprinter) {
|
|
28292
28321
|
const key = coordinate[0];
|
|
28293
28322
|
if (typeof key !== "string") return false;
|
|
@@ -28309,7 +28338,7 @@ async function noEchoDeleteValuesFromResolved(options) {
|
|
|
28309
28338
|
if (masked.length === 0 || templateResource === void 0 || resolvedProperties === void 0) return;
|
|
28310
28339
|
if (templateResource.Type !== record.resourceType) return void 0;
|
|
28311
28340
|
if (carriesResolvedSecret(options.secrets)) return void 0;
|
|
28312
|
-
const nodes =
|
|
28341
|
+
const nodes = noEchoParameterNodesAt(templateResource.Properties, resolvedProperties, options.noEchoParameters, options.conditions);
|
|
28313
28342
|
const bag = new Map(options.secrets);
|
|
28314
28343
|
carryLogOnlyValues(options.secrets, bag);
|
|
28315
28344
|
const templateProps = isRecord(templateResource.Properties) ? templateResource.Properties : {};
|
|
@@ -28474,6 +28503,11 @@ var TemplateNoEchoReresolver = class TemplateNoEchoReresolver {
|
|
|
28474
28503
|
}
|
|
28475
28504
|
return bag;
|
|
28476
28505
|
}
|
|
28506
|
+
recordedNoEchoValuesFor(logicalId, record) {
|
|
28507
|
+
const resources = this.options.template.Resources;
|
|
28508
|
+
const templateResource = resources !== void 0 && resources !== null && Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
|
|
28509
|
+
return recordedNoEchoValuesOf(templateResource?.Type === record?.resourceType ? templateResource?.Properties : void 0, record, this.noEchoParameters, void 0);
|
|
28510
|
+
}
|
|
28477
28511
|
async valuesFor(logicalId, record) {
|
|
28478
28512
|
const masked = maskedNoEchoCoordinates(record.properties, noEchoLeavesOf(record));
|
|
28479
28513
|
if (masked.length === 0) return void 0;
|
|
@@ -28482,7 +28516,7 @@ var TemplateNoEchoReresolver = class TemplateNoEchoReresolver {
|
|
|
28482
28516
|
if (templateResource?.Type !== record.resourceType) return void 0;
|
|
28483
28517
|
const parameters = await this.boundParameters();
|
|
28484
28518
|
if (parameters === void 0) return void 0;
|
|
28485
|
-
const nodes =
|
|
28519
|
+
const nodes = noEchoParameterNodesAt(templateResource.Properties, record.properties, this.noEchoParameters, void 0);
|
|
28486
28520
|
const declared = new Set(Object.keys(this.options.template.Parameters ?? {}));
|
|
28487
28521
|
const templateProps = isRecord(templateResource.Properties) ? templateResource.Properties : {};
|
|
28488
28522
|
const fingerprinter = inputFingerprinter(templateProps, this.inputSources(parameters));
|
|
@@ -28492,7 +28526,7 @@ var TemplateNoEchoReresolver = class TemplateNoEchoReresolver {
|
|
|
28492
28526
|
for (const coordinate of masked) {
|
|
28493
28527
|
const key = canonicalJson$3(coordinate);
|
|
28494
28528
|
if (!nodes.has(key)) continue;
|
|
28495
|
-
const node = nodes.get(key);
|
|
28529
|
+
const node = nodes.get(key)?.node;
|
|
28496
28530
|
if (!readsParametersOnly(node, declared, refused)) continue;
|
|
28497
28531
|
if (!await fingerprintsUnchanged(record, templateProps, coordinate, fingerprinter)) continue;
|
|
28498
28532
|
let value;
|
|
@@ -32188,96 +32222,103 @@ function deepEqualValue(a, b) {
|
|
|
32188
32222
|
|
|
32189
32223
|
//#endregion
|
|
32190
32224
|
//#region src/deployment/deploy-engine/provenance-capture.ts
|
|
32191
|
-
|
|
32192
|
-
|
|
32193
|
-
|
|
32194
|
-
|
|
32195
|
-
|
|
32196
|
-
if (record === void 0 || hasReferenceProvenanceField(record)) continue;
|
|
32197
|
-
const tokens = recordReferenceTokens(record);
|
|
32198
|
-
if (tokens.size === 0) continue;
|
|
32199
|
-
const properties = (Object.hasOwn(template.Resources, logicalId) ? template.Resources[logicalId] : void 0)?.Properties ?? {};
|
|
32200
|
-
const task = chain.then(() => captureOne(this, logicalId, record, tokens, properties, args)).catch(() => ({
|
|
32201
|
-
record,
|
|
32202
|
-
field: void 0
|
|
32203
|
-
}));
|
|
32204
|
-
chain = task;
|
|
32205
|
-
this.provenanceCaptureTasks.set(logicalId, task);
|
|
32225
|
+
var ProvenanceCapture = class {
|
|
32226
|
+
tasks = /* @__PURE__ */ new Map();
|
|
32227
|
+
deps;
|
|
32228
|
+
constructor(deps) {
|
|
32229
|
+
this.deps = deps;
|
|
32206
32230
|
}
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
|
|
32215
|
-
|
|
32216
|
-
|
|
32217
|
-
...args.conditions && { conditions: args.conditions }
|
|
32218
|
-
}, args.stackName);
|
|
32219
|
-
const { producerSecrets: _producer, ...withoutRecorders } = base;
|
|
32220
|
-
const context = {
|
|
32221
|
-
...withoutRecorders,
|
|
32222
|
-
recordedSecretValues: bag,
|
|
32223
|
-
recordedImports: [],
|
|
32224
|
-
recordedOutputReads: [],
|
|
32225
|
-
staleAttributeHeal: { phase: "probe" },
|
|
32226
|
-
printingSecrets: /* @__PURE__ */ new Map(),
|
|
32227
|
-
provenanceCapture: true
|
|
32228
|
-
};
|
|
32229
|
-
const stored = record.properties ?? {};
|
|
32230
|
-
for (const [key, value] of Object.entries(properties)) {
|
|
32231
|
-
if (!Object.hasOwn(stored, key) || recordReferenceTokens({ properties: stored[key] }).size === 0) continue;
|
|
32232
|
-
try {
|
|
32233
|
-
await engine.resolver.resolve(structuredClone(value), context);
|
|
32234
|
-
} catch (error) {
|
|
32235
|
-
if (isThrottlingError(error)) return {
|
|
32231
|
+
kickOffProvenanceCapture(args) {
|
|
32232
|
+
const { noChange, resources, template } = args;
|
|
32233
|
+
let chain = Promise.resolve();
|
|
32234
|
+
for (const logicalId of noChange) {
|
|
32235
|
+
const record = Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
|
|
32236
|
+
if (record === void 0 || hasReferenceProvenanceField(record)) continue;
|
|
32237
|
+
const tokens = recordReferenceTokens(record);
|
|
32238
|
+
if (tokens.size === 0) continue;
|
|
32239
|
+
const properties = (Object.hasOwn(template.Resources, logicalId) ? template.Resources[logicalId] : void 0)?.Properties ?? {};
|
|
32240
|
+
const task = chain.then(() => this.captureOne(logicalId, record, tokens, properties, args)).catch(() => ({
|
|
32236
32241
|
record,
|
|
32237
32242
|
field: void 0
|
|
32238
|
-
};
|
|
32243
|
+
}));
|
|
32244
|
+
chain = task;
|
|
32245
|
+
this.tasks.set(logicalId, task);
|
|
32239
32246
|
}
|
|
32240
32247
|
}
|
|
32241
|
-
|
|
32242
|
-
|
|
32243
|
-
|
|
32244
|
-
|
|
32245
|
-
const
|
|
32246
|
-
const
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
...
|
|
32250
|
-
...
|
|
32251
|
-
})
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32255
|
-
|
|
32256
|
-
|
|
32257
|
-
|
|
32258
|
-
|
|
32259
|
-
|
|
32260
|
-
|
|
32261
|
-
|
|
32262
|
-
|
|
32263
|
-
|
|
32264
|
-
|
|
32265
|
-
|
|
32266
|
-
|
|
32267
|
-
|
|
32268
|
-
|
|
32269
|
-
|
|
32270
|
-
|
|
32271
|
-
|
|
32272
|
-
|
|
32273
|
-
|
|
32274
|
-
|
|
32275
|
-
|
|
32248
|
+
warnUnattributed(logicalId) {
|
|
32249
|
+
this.deps.logger.warn(safeMsg`Could not record where the secret reference(s) in ${logicalId} were resolved (state schema v12 migration). cdkd keeps its previous handling of them; update ${logicalId} to record it.`);
|
|
32250
|
+
}
|
|
32251
|
+
async captureOne(logicalId, record, tokens, properties, args) {
|
|
32252
|
+
const bag = /* @__PURE__ */ new Map();
|
|
32253
|
+
const { attributeHealer: _healer, ...base } = this.deps.buildResolverContext({
|
|
32254
|
+
template: args.template,
|
|
32255
|
+
resources: { ...args.resources },
|
|
32256
|
+
...args.parameters && { parameters: args.parameters },
|
|
32257
|
+
...args.conditions && { conditions: args.conditions }
|
|
32258
|
+
}, args.stackName);
|
|
32259
|
+
const { producerSecrets: _producer, ...withoutRecorders } = base;
|
|
32260
|
+
const context = {
|
|
32261
|
+
...withoutRecorders,
|
|
32262
|
+
recordedSecretValues: bag,
|
|
32263
|
+
recordedImports: [],
|
|
32264
|
+
recordedOutputReads: [],
|
|
32265
|
+
staleAttributeHeal: { phase: "probe" },
|
|
32266
|
+
printingSecrets: /* @__PURE__ */ new Map(),
|
|
32267
|
+
provenanceCapture: true
|
|
32268
|
+
};
|
|
32269
|
+
const stored = record.properties ?? {};
|
|
32270
|
+
for (const [key, value] of Object.entries(properties)) {
|
|
32271
|
+
if (!Object.hasOwn(stored, key) || recordReferenceTokens({ properties: stored[key] }).size === 0) continue;
|
|
32272
|
+
try {
|
|
32273
|
+
await this.deps.resolver.resolve(structuredClone(value), context);
|
|
32274
|
+
} catch (error) {
|
|
32275
|
+
if (isThrottlingError(error)) return {
|
|
32276
|
+
record,
|
|
32277
|
+
field: void 0
|
|
32278
|
+
};
|
|
32279
|
+
}
|
|
32280
|
+
}
|
|
32281
|
+
const physicalId = typeof record.physicalId === "string" ? record.physicalId.toLowerCase() : "";
|
|
32282
|
+
const field = {};
|
|
32283
|
+
let unattributed = false;
|
|
32284
|
+
for (const token of [...tokens].sort()) {
|
|
32285
|
+
const pass = passProvenanceFor(bag, token);
|
|
32286
|
+
const plaintext = resolvedPlaintextOf(bag, token);
|
|
32287
|
+
const named = plaintext !== void 0 && plaintext.length >= 4 && physicalId.includes(plaintext.toLowerCase());
|
|
32288
|
+
const entry = validateReferenceProvenance(token, {
|
|
32289
|
+
...pass?.region !== void 0 && { region: pass.region },
|
|
32290
|
+
...named && pass?.versions !== void 0 && { versions: pass.versions }
|
|
32291
|
+
}) ?? {};
|
|
32292
|
+
if (entry.region === void 0 && entry.versions === void 0) unattributed = true;
|
|
32293
|
+
field[token] = entry;
|
|
32294
|
+
}
|
|
32295
|
+
if (unattributed) this.warnUnattributed(logicalId);
|
|
32296
|
+
return {
|
|
32297
|
+
record,
|
|
32298
|
+
field
|
|
32276
32299
|
};
|
|
32277
|
-
installed++;
|
|
32278
32300
|
}
|
|
32279
|
-
|
|
32280
|
-
|
|
32301
|
+
async drainProvenanceCaptures(stateResources) {
|
|
32302
|
+
if (this.tasks.size === 0) return 0;
|
|
32303
|
+
const entries = [...this.tasks.entries()];
|
|
32304
|
+
this.tasks.clear();
|
|
32305
|
+
const outcomes = await Promise.all(entries.map(([, task]) => task));
|
|
32306
|
+
let installed = 0;
|
|
32307
|
+
for (let i = 0; i < entries.length; i++) {
|
|
32308
|
+
const logicalId = entries[i][0];
|
|
32309
|
+
const { record, field } = outcomes[i];
|
|
32310
|
+
if (field === void 0) continue;
|
|
32311
|
+
const target = Object.hasOwn(stateResources, logicalId) ? stateResources[logicalId] : void 0;
|
|
32312
|
+
if (target === void 0 || target.physicalId !== record.physicalId || target.resourceType !== record.resourceType) continue;
|
|
32313
|
+
stateResources[logicalId] = {
|
|
32314
|
+
...target,
|
|
32315
|
+
referenceProvenance: field
|
|
32316
|
+
};
|
|
32317
|
+
installed++;
|
|
32318
|
+
}
|
|
32319
|
+
return installed;
|
|
32320
|
+
}
|
|
32321
|
+
};
|
|
32281
32322
|
function provenanceBaselineOf(state, tokenFree) {
|
|
32282
32323
|
return {
|
|
32283
32324
|
outputs: state.outputs,
|
|
@@ -33128,8 +33169,32 @@ function secretNameNeedlesOf(logicalId, record, secrets, options) {
|
|
|
33128
33169
|
for (const needle of printingCorpusOf(embeddedBag).keys()) if (needle !== "" && (needle === physicalId || needle.length >= 4 && physicalId.includes(needle))) add(needle);
|
|
33129
33170
|
}
|
|
33130
33171
|
if (physicalId !== void 0) for (const spelling of finalSnapshotSpellingsOf(physicalId, record?.resourceType, needles)) add(spelling);
|
|
33172
|
+
for (const leaf of secretNamedAttributeLeavesOf(record)) add(leaf);
|
|
33131
33173
|
return needles.size > 0 ? needles : void 0;
|
|
33132
33174
|
}
|
|
33175
|
+
function secretNamedAttributeLeavesOf(record) {
|
|
33176
|
+
if (record?.resourceType !== "AWS::CloudFormation::Stack") return [];
|
|
33177
|
+
const names = record.secretNamedAttributes;
|
|
33178
|
+
const attributes = record.attributes;
|
|
33179
|
+
if (!Array.isArray(names) || attributes === null || typeof attributes !== "object") return [];
|
|
33180
|
+
const leaves = [];
|
|
33181
|
+
for (const name of names) {
|
|
33182
|
+
if (typeof name !== "string" || !Object.hasOwn(attributes, name)) continue;
|
|
33183
|
+
for (const leaf of wholeStringLeavesOf(attributes[name])) if (leaf !== "" && leaf !== "***" && !leaf.includes("{{resolve:")) leaves.push(leaf);
|
|
33184
|
+
}
|
|
33185
|
+
return leaves;
|
|
33186
|
+
}
|
|
33187
|
+
function secretNamedAttributeNamesOf(attributes, childResources, secrets) {
|
|
33188
|
+
const needles = [...printingCorpusOf(secretNamedRecordNeedles(childResources, secrets)).keys()];
|
|
33189
|
+
if (needles.length === 0) return [];
|
|
33190
|
+
const names = [];
|
|
33191
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
33192
|
+
const leaves = [...wholeStringLeavesOf(value)].filter((leaf) => leaf !== "");
|
|
33193
|
+
if (leaves.length === 0) continue;
|
|
33194
|
+
if (needles.some((needle) => leavesHoldNeedle(leaves, needle))) names.push(name);
|
|
33195
|
+
}
|
|
33196
|
+
return names.sort();
|
|
33197
|
+
}
|
|
33133
33198
|
function finalSnapshotSpellingsOf(physicalId, resourceType, needles) {
|
|
33134
33199
|
if (typeof resourceType !== "string" || !(ATOMIC_FINAL_SNAPSHOT_TYPES.has(resourceType) || PRE_DELETE_SNAPSHOT_TYPES.has(resourceType))) return [];
|
|
33135
33200
|
const { prefix, sanitized, kept } = finalSnapshotNameCut(physicalId, resourceType);
|
|
@@ -33145,6 +33210,20 @@ function finalSnapshotSpellingsOf(physicalId, resourceType, needles) {
|
|
|
33145
33210
|
}
|
|
33146
33211
|
return spellings;
|
|
33147
33212
|
}
|
|
33213
|
+
function namingBagOf(secrets, logicalId) {
|
|
33214
|
+
const bag = typeof secrets === "function" ? secrets(logicalId) : secrets;
|
|
33215
|
+
return bag !== void 0 && hasMaskableValues(bag) ? bag : void 0;
|
|
33216
|
+
}
|
|
33217
|
+
function namingSecretsWithRecordedNoEcho(base, recorded) {
|
|
33218
|
+
const memo = /* @__PURE__ */ new Map();
|
|
33219
|
+
return (logicalId) => {
|
|
33220
|
+
if (memo.has(logicalId)) return memo.get(logicalId);
|
|
33221
|
+
const own = recorded(logicalId);
|
|
33222
|
+
const bag = own === void 0 || !hasMaskableValues(own) ? base : unionOfSecretBags([base, own]);
|
|
33223
|
+
memo.set(logicalId, bag);
|
|
33224
|
+
return bag;
|
|
33225
|
+
};
|
|
33226
|
+
}
|
|
33148
33227
|
function secretNamesReadBy(logicalId, record, resources, judge = () => ({
|
|
33149
33228
|
secrets: void 0,
|
|
33150
33229
|
embedded: void 0
|
|
@@ -33165,7 +33244,7 @@ function leavesHoldNeedle(leaves, needle) {
|
|
|
33165
33244
|
return leaves.some((leaf) => leaf === needle || needle.length >= 4 && leaf.includes(needle));
|
|
33166
33245
|
}
|
|
33167
33246
|
function stateSecretNameNeedles(resources, secrets) {
|
|
33168
|
-
return (logicalId) => secretNameNeedlesOf(logicalId, Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0, secrets, { embedded: void 0 });
|
|
33247
|
+
return (logicalId) => secretNameNeedlesOf(logicalId, Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0, namingBagOf(secrets, logicalId), { embedded: void 0 });
|
|
33169
33248
|
}
|
|
33170
33249
|
function storedRecordNameNeedles(logicalId, record, secrets) {
|
|
33171
33250
|
const needles = secretNameNeedlesOf(logicalId, record, secrets, { embedded: void 0 });
|
|
@@ -33182,7 +33261,7 @@ function storedRecordNameNeedles(logicalId, record, secrets) {
|
|
|
33182
33261
|
function storedSecretNameNeedles(resources, secrets, bag = /* @__PURE__ */ new Map(), outputs) {
|
|
33183
33262
|
const named = [];
|
|
33184
33263
|
for (const [logicalId, record] of Object.entries(resources)) {
|
|
33185
|
-
const needles = storedRecordNameNeedles(logicalId, record, secrets);
|
|
33264
|
+
const needles = storedRecordNameNeedles(logicalId, record, namingBagOf(secrets, logicalId));
|
|
33186
33265
|
if (needles !== void 0) named.push([logicalId, needles]);
|
|
33187
33266
|
}
|
|
33188
33267
|
if (named.length === 0) return bag;
|
|
@@ -33203,19 +33282,18 @@ function secretNamesStoredIn(record, needles) {
|
|
|
33203
33282
|
return [...needles].filter((needle) => leavesHoldNeedle(leaves, needle));
|
|
33204
33283
|
}
|
|
33205
33284
|
function secretNamedRecordNeedles(resources, secrets, bag = /* @__PURE__ */ new Map()) {
|
|
33206
|
-
for (const [logicalId, record] of Object.entries(resources)) for (const needle of storedRecordNameNeedles(logicalId, record, secrets) ?? []) recordLogOnlyValue(bag, needle);
|
|
33285
|
+
for (const [logicalId, record] of Object.entries(resources)) for (const needle of storedRecordNameNeedles(logicalId, record, namingBagOf(secrets, logicalId)) ?? []) recordLogOnlyValue(bag, needle);
|
|
33207
33286
|
return bag;
|
|
33208
33287
|
}
|
|
33209
33288
|
function secretNamePrintingBag(logicalId, resources) {
|
|
33210
33289
|
return secretNamePrintingBags(resources, void 0)(logicalId);
|
|
33211
33290
|
}
|
|
33212
33291
|
function secretNamePrintingBags(resources, noEchoValues) {
|
|
33213
|
-
const secrets = noEchoValues !== void 0 && hasMaskableValues(noEchoValues) ? noEchoValues : void 0;
|
|
33214
33292
|
const judged = /* @__PURE__ */ new Map();
|
|
33215
33293
|
const needlesOf = (logicalId, record) => {
|
|
33216
33294
|
const hit = judged.get(logicalId);
|
|
33217
33295
|
if (hit !== void 0 && hit.record === record) return hit.needles;
|
|
33218
|
-
const needles = secretNameNeedlesOf(logicalId, record,
|
|
33296
|
+
const needles = secretNameNeedlesOf(logicalId, record, namingBagOf(noEchoValues, logicalId), { embedded: void 0 });
|
|
33219
33297
|
judged.set(logicalId, {
|
|
33220
33298
|
record,
|
|
33221
33299
|
needles
|
|
@@ -33224,6 +33302,7 @@ function secretNamePrintingBags(resources, noEchoValues) {
|
|
|
33224
33302
|
};
|
|
33225
33303
|
return (logicalId) => {
|
|
33226
33304
|
const bag = /* @__PURE__ */ new Map();
|
|
33305
|
+
const secrets = namingBagOf(noEchoValues, logicalId);
|
|
33227
33306
|
if (secrets !== void 0) carryLogOnlyValues(secrets, bag);
|
|
33228
33307
|
const record = Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
|
|
33229
33308
|
for (const needle of needlesOf(logicalId, record) ?? []) recordLogOnlyValue(bag, needle);
|
|
@@ -33324,56 +33403,6 @@ function maskEventTextWithBoundBags(event) {
|
|
|
33324
33403
|
const DEFAULT_RESOURCE_WARN_AFTER_MS = 3e5;
|
|
33325
33404
|
const DEFAULT_RESOURCE_TIMEOUT_MS = 18e5;
|
|
33326
33405
|
|
|
33327
|
-
//#endregion
|
|
33328
|
-
//#region src/deployment/deploy-engine/name-collision.ts
|
|
33329
|
-
function replacementNameOrigin(logicalId, physicalId) {
|
|
33330
|
-
if (looksLikeCdkdGeneratedName(physicalId, logicalId, getCurrentStackName())) return {
|
|
33331
|
-
descriptor: `The physical name (${physicalId}) was GENERATED by cdkd from the construct's logical id rather than declared in your template, and that derivation has no random component — so the new resource asks for exactly the name the existing one still holds`,
|
|
33332
|
-
remedy: "Either give the resource an explicit physical name in your CDK code, or rename the CONSTRUCT (its id feeds the generated name — note that this replaces the resource rather than renaming it in place)"
|
|
33333
|
-
};
|
|
33334
|
-
return {
|
|
33335
|
-
descriptor: `The resource has a user-supplied physical name (${physicalId})`,
|
|
33336
|
-
remedy: "Either rename the resource in your CDK code (a fresh name lets the safe create-first order proceed)"
|
|
33337
|
-
};
|
|
33338
|
-
}
|
|
33339
|
-
function orphanedNameCollisionAdvice(changeType, logicalId, error) {
|
|
33340
|
-
if (changeType !== "CREATE") return void 0;
|
|
33341
|
-
if (!(error instanceof ProvisioningError)) return void 0;
|
|
33342
|
-
const physicalId = error.physicalId;
|
|
33343
|
-
if (!physicalId) return void 0;
|
|
33344
|
-
const replayed = isReplayedNameCollisionFrom(error, logicalId, (link) => isAuxiliaryMarkOf(link, RETRY_AUXILIARY_OWNER));
|
|
33345
|
-
if (!replayed && !isNameCollisionErrorFrom(error, logicalId)) return void 0;
|
|
33346
|
-
const stackName = getCurrentStackName();
|
|
33347
|
-
if (!looksLikeCdkdGeneratedName(physicalId, logicalId, stackName)) return void 0;
|
|
33348
|
-
if (!stackName) return void 0;
|
|
33349
|
-
const safeId = displaySafe(physicalId, { asciiOnly: true });
|
|
33350
|
-
const safeStack = displaySafe(stackName, { asciiOnly: true });
|
|
33351
|
-
const safeLogicalId = displaySafe(logicalId, { asciiOnly: true });
|
|
33352
|
-
const idShown = isInertUnquoted(safeId);
|
|
33353
|
-
const shownId = idShown ? safeId : "a name that cannot be shown safely here";
|
|
33354
|
-
const shownLogicalId = isInertUnquoted(safeLogicalId) ? safeLogicalId : "A resource whose logical id cannot be shown safely here";
|
|
33355
|
-
const diagnosis = replayed ? `${shownLogicalId}: the name AWS reports as taken (${shownId}) is most likely held by a resource THIS create made. An earlier attempt of it ended without a clear verdict (a server error, a dropped connection or a timeout, or a failure after the create call itself may have succeeded), and the retry then found the name taken. A dropped connection can also happen before the request reached AWS, so the holder may be another resource: confirm it is yours before deleting or importing it. cdkd records a resource only once its create succeeds, so this one is in no state file: no rollback or cdkd destroy will remove it, and re-running collides with it again.` : `${shownLogicalId}: the name AWS reports as taken (${shownId}) is one cdkd DERIVED from the logical id, and that derivation has no random component — so this is most likely a resource an earlier cdkd run left behind. A rollback leaves a resource carrying DeletionPolicy: Retain in AWS and drops it from state, as CloudFormation does; what differs is the name. CloudFormation would generate a fresh one for an unnamed resource and redeploy clean, whereas cdkd asks again for the name the orphan still holds — so re-running does not clear this.`;
|
|
33356
|
-
const deleteArm = `If it is not a resource you want to keep, delete ${idShown ? safeId : "it"} in AWS — after confirming it holds nothing you need${replayed ? "" : ", since Retain is what kept it"} — and re-deploy.`;
|
|
33357
|
-
let canImport;
|
|
33358
|
-
try {
|
|
33359
|
-
canImport = typeof this.providerRegistry.getProvider(error.resourceType).import === "function";
|
|
33360
|
-
} catch {
|
|
33361
|
-
canImport = false;
|
|
33362
|
-
}
|
|
33363
|
-
const commandNamesTheRightResource = safeId === physicalId && safeStack === stackName && safeLogicalId === logicalId;
|
|
33364
|
-
const importableTarget = !stackName.includes("~");
|
|
33365
|
-
if (!canImport || !commandNamesTheRightResource || !importableTarget) return `${diagnosis} ${!canImport ? `cdkd cannot adopt ${displaySafe(error.resourceType, { asciiOnly: true })} back into state (its provider implements no import)` : !importableTarget ? `this is a nested-stack child, whose stack name cdkd import cannot resolve` : `cdkd cannot render an import command that provably names this resource`}, so the way forward is to delete it. ${deleteArm}`;
|
|
33366
|
-
const adopt = pasteableCommand("cdkd import", [{
|
|
33367
|
-
value: stackName,
|
|
33368
|
-
hole: "stack"
|
|
33369
|
-
}, {
|
|
33370
|
-
flag: "--resource",
|
|
33371
|
-
value: `${logicalId}=${physicalId}`,
|
|
33372
|
-
hole: "logicalId=physicalId"
|
|
33373
|
-
}]);
|
|
33374
|
-
return `${diagnosis} To recover, adopt it back into state instead of re-creating it, with the command below (a selective import merges into existing state and needs no --force while the resource is absent from it). CONFIRM IT IS YOURS FIRST — a name cdkd derives is predictable, so for a globally-namespaced type it can belong to another account, and the same stack deployed in another region derives the same name. ${deleteArm}${adopt.withheld.length === 0 ? "" : " The command below prints a quoted hole in place of a value cdkd will not name on a command line; replace it whole, quotes included, with your stack name or '<logicalId>=<name>', shell-quoted."}\nAdopt with: ${adopt.command}`;
|
|
33375
|
-
}
|
|
33376
|
-
|
|
33377
33406
|
//#endregion
|
|
33378
33407
|
//#region src/analyzer/skipped-outputs.ts
|
|
33379
33408
|
function canonicalJson$1(value) {
|
|
@@ -33707,6 +33736,18 @@ function exportAliasCollisionScrubWarning(outputKey, exportName, secrets) {
|
|
|
33707
33736
|
|
|
33708
33737
|
//#endregion
|
|
33709
33738
|
//#region src/deployment/deploy-engine/outputs.ts
|
|
33739
|
+
var OutputsRunState = class {
|
|
33740
|
+
outputSecrets = /* @__PURE__ */ new Map();
|
|
33741
|
+
outputsPassSecretMaps = [];
|
|
33742
|
+
outputsTemplateSource = Object.create(null);
|
|
33743
|
+
resolvedExportNames = [];
|
|
33744
|
+
carriedExportAliasRefusal;
|
|
33745
|
+
skippedOutputs;
|
|
33746
|
+
outputsSourceUsable = true;
|
|
33747
|
+
outputProvenanceSinks = /* @__PURE__ */ new Map();
|
|
33748
|
+
outputsResolvedThisRun = /* @__PURE__ */ new WeakSet();
|
|
33749
|
+
resolvedOutputsBag = void 0;
|
|
33750
|
+
};
|
|
33710
33751
|
var ForwardingSecrets = class extends Map {
|
|
33711
33752
|
target;
|
|
33712
33753
|
constructor(target) {
|
|
@@ -33719,25 +33760,25 @@ var ForwardingSecrets = class extends Map {
|
|
|
33719
33760
|
return this;
|
|
33720
33761
|
}
|
|
33721
33762
|
};
|
|
33722
|
-
function handleOutputResolutionFailure(error, outputKey, outputs, secrets, inheritedSecrets) {
|
|
33763
|
+
function handleOutputResolutionFailure(deps, error, outputKey, outputs, secrets, inheritedSecrets) {
|
|
33723
33764
|
const union = unionOfSecretBags([inheritedSecrets, secrets]);
|
|
33724
33765
|
const detail = maskSecretsInText(error instanceof Error ? error.message || error.name : String(error), union);
|
|
33725
|
-
if (
|
|
33766
|
+
if (deps.options.strictGetAtt) {
|
|
33726
33767
|
const cause = typeof error === "string" ? maskSecretsInText(error, union) : maskSecretsInError(error, union);
|
|
33727
33768
|
throw new Error(safeMsg`Failed to resolve output ${outputKey} ` + `(--strict-getatt promotes output resolution failures to deploy errors; ` + safeMsg`drop the flag to skip the output instead): ${asIsMessage(detail)}`, cause instanceof Error || typeof cause === "string" ? { cause } : {});
|
|
33728
33769
|
}
|
|
33729
|
-
|
|
33770
|
+
deps.logger.warn(safeMsg`Failed to resolve output ${outputKey}: ${asIsMessage(detail)}`);
|
|
33730
33771
|
outputs[outputKey] = void 0;
|
|
33731
33772
|
}
|
|
33732
|
-
async function resolveOutputs(template, resources, stackName, digestSource, parameterValues, conditions) {
|
|
33733
|
-
|
|
33734
|
-
|
|
33773
|
+
async function resolveOutputs(run, deps, template, resources, stackName, digestSource, parameterValues, conditions) {
|
|
33774
|
+
run.resolvedExportNames = [];
|
|
33775
|
+
run.carriedExportAliasRefusal = void 0;
|
|
33735
33776
|
if (!template.Outputs) {
|
|
33736
|
-
|
|
33777
|
+
run.carriedExportAliasRefusal = seedOnlyAliasRefusal(noEchoParameterValueSeed(template.Parameters, parameterValues, deps.options.inheritedSecrets, deps.options.parameters));
|
|
33737
33778
|
return {};
|
|
33738
33779
|
}
|
|
33739
33780
|
const outputs = Object.create(null);
|
|
33740
|
-
const context =
|
|
33781
|
+
const context = deps.buildResolverContext({
|
|
33741
33782
|
template,
|
|
33742
33783
|
resources,
|
|
33743
33784
|
...parameterValues && { parameters: parameterValues },
|
|
@@ -33752,37 +33793,37 @@ async function resolveOutputs(template, resources, stackName, digestSource, para
|
|
|
33752
33793
|
const outputsPassSecrets = context.recordedSecretValues ?? EMPTY_SECRETS;
|
|
33753
33794
|
const outputsPassInherited = context.inheritedSecrets ?? EMPTY_SECRETS;
|
|
33754
33795
|
if (context.recordedSecretValues) {
|
|
33755
|
-
|
|
33756
|
-
mirrorInheritedParameterReads(context.recordedSecretValues,
|
|
33757
|
-
if (
|
|
33796
|
+
run.outputsPassSecretMaps.push(context.recordedSecretValues);
|
|
33797
|
+
mirrorInheritedParameterReads(context.recordedSecretValues, run.outputSecrets);
|
|
33798
|
+
if (deps.options.inheritedSecrets && deps.options.inheritedSecrets.size > 0) inheritNestedStackParameterAssociations(run.outputSecrets, deps.options.inheritedSecrets);
|
|
33758
33799
|
}
|
|
33759
33800
|
const publishedOutputNames = collectPublishedOutputNames(template.Outputs, conditions);
|
|
33760
33801
|
let outputsPassCompleted = false;
|
|
33761
33802
|
try {
|
|
33762
33803
|
for (const [outputKey, output] of Object.entries(template.Outputs)) {
|
|
33763
33804
|
if (isOutputSuppressedByCondition(output, conditions)) {
|
|
33764
|
-
|
|
33805
|
+
deps.logger.debug(safeMsg`Skipping output ${outputKey} — condition ${output.Condition} is false`);
|
|
33765
33806
|
continue;
|
|
33766
33807
|
}
|
|
33767
33808
|
const ownReads = [];
|
|
33768
33809
|
const provenanceSink = /* @__PURE__ */ new Map();
|
|
33769
|
-
|
|
33810
|
+
run.outputProvenanceSinks.set(outputKey, provenanceSink);
|
|
33770
33811
|
try {
|
|
33771
|
-
const resolved = await
|
|
33812
|
+
const resolved = await deps.resolver.resolve(output.Value, {
|
|
33772
33813
|
...context,
|
|
33773
33814
|
redactedAttributeReads: ownReads,
|
|
33774
33815
|
provenanceSink
|
|
33775
33816
|
});
|
|
33776
33817
|
refuseMaskedOutputReads(outputKey, ownReads);
|
|
33777
|
-
if (resolved === void 0 &&
|
|
33818
|
+
if (resolved === void 0 && deps.options.strictGetAtt) throw markNonRetryable(/* @__PURE__ */ new Error("the value resolved to nothing"));
|
|
33778
33819
|
outputs[outputKey] = resolved;
|
|
33779
33820
|
} catch (error) {
|
|
33780
|
-
|
|
33821
|
+
handleOutputResolutionFailure(deps, error, outputKey, outputs, outputsPassSecrets, outputsPassInherited);
|
|
33781
33822
|
}
|
|
33782
33823
|
}
|
|
33783
|
-
const noEchoSeed = noEchoParameterValueSeed(template.Parameters, parameterValues, context.inheritedSecrets,
|
|
33784
|
-
const noEchoSources =
|
|
33785
|
-
|
|
33824
|
+
const noEchoSeed = noEchoParameterValueSeed(template.Parameters, parameterValues, context.inheritedSecrets, deps.options.parameters);
|
|
33825
|
+
const noEchoSources = deps.noEchoPositionSources(resources, template, conditions);
|
|
33826
|
+
run.carriedExportAliasRefusal = (outputKey, exportName) => {
|
|
33786
33827
|
const verdict = carriedExportAliasExposure(exportName, outputsPassSecrets, noEchoSeed);
|
|
33787
33828
|
if (verdict === void 0) return void 0;
|
|
33788
33829
|
return secretBearingExportNameWarning(outputKey, exportName, verdict.exposure, context.recordedSecretValues, verdict.noEchoOnly);
|
|
@@ -33798,14 +33839,14 @@ async function resolveOutputs(template, resources, stackName, digestSource, para
|
|
|
33798
33839
|
const nameReads = [];
|
|
33799
33840
|
let exportName;
|
|
33800
33841
|
try {
|
|
33801
|
-
exportName = typeof output.Export.Name === "string" ? output.Export.Name : await
|
|
33842
|
+
exportName = typeof output.Export.Name === "string" ? output.Export.Name : await deps.resolver.resolve(output.Export.Name, {
|
|
33802
33843
|
...context,
|
|
33803
33844
|
recordedSecretValues: nameSecrets,
|
|
33804
33845
|
redactedAttributeReads: nameReads
|
|
33805
33846
|
});
|
|
33806
33847
|
refuseMaskedOutputReads(outputKey, nameReads);
|
|
33807
33848
|
} catch (error) {
|
|
33808
|
-
|
|
33849
|
+
handleOutputResolutionFailure(deps, error, outputKey, outputs, outputsPassSecrets, outputsPassInherited);
|
|
33809
33850
|
continue;
|
|
33810
33851
|
}
|
|
33811
33852
|
if (typeof exportName !== "string") continue;
|
|
@@ -33821,28 +33862,28 @@ async function resolveOutputs(template, resources, stackName, digestSource, para
|
|
|
33821
33862
|
for (const { outputKey, exportName, value, outputValue, nameSource, nameSecrets } of resolvedNames) {
|
|
33822
33863
|
const noEchoParameters = exportNameNoEchoParameters(nameSource, noEchoSources);
|
|
33823
33864
|
const exposure = noEchoParameters.length > 0 ? void 0 : exportNameSecretExposure(exportName, nameSecrets, context.recordedSecretValues, noEchoSeed);
|
|
33824
|
-
if (noEchoParameters.length > 0)
|
|
33825
|
-
else if (exposure)
|
|
33826
|
-
else if (isExportAliasCollision(exportName, outputKey, publishedOutputNames))
|
|
33865
|
+
if (noEchoParameters.length > 0) deps.logger.warn(noEchoParameterExportNameWarning(outputKey, noEchoParameters, outputsPassSecrets));
|
|
33866
|
+
else if (exposure) deps.logger.warn(secretBearingExportNameWarning(outputKey, exportName, exposure, context.recordedSecretValues, isNoEchoOnlyExposure(exposure, nameSecrets, context.recordedSecretValues)));
|
|
33867
|
+
else if (isExportAliasCollision(exportName, outputKey, publishedOutputNames)) deps.logger.warn(exportAliasCollisionWarning(outputKey, exportName, outputsPassSecrets));
|
|
33827
33868
|
else {
|
|
33828
33869
|
outputs[exportName] = value;
|
|
33829
|
-
const aliasedSink =
|
|
33830
|
-
if (aliasedSink !== void 0)
|
|
33831
|
-
if (!
|
|
33832
|
-
|
|
33870
|
+
const aliasedSink = run.outputProvenanceSinks.get(outputKey);
|
|
33871
|
+
if (aliasedSink !== void 0) run.outputProvenanceSinks.set(exportName, aliasedSink);
|
|
33872
|
+
if (!run.resolvedExportNames.includes(exportName)) run.resolvedExportNames.push(exportName);
|
|
33873
|
+
run.outputsTemplateSource[exportName] = outputValue;
|
|
33833
33874
|
}
|
|
33834
33875
|
}
|
|
33835
33876
|
outputsPassCompleted = true;
|
|
33836
33877
|
} finally {
|
|
33837
|
-
if (!outputsPassCompleted)
|
|
33878
|
+
if (!outputsPassCompleted) run.outputsSourceUsable = false;
|
|
33838
33879
|
}
|
|
33839
33880
|
for (const [outputKey, output] of Object.entries(template.Outputs)) {
|
|
33840
33881
|
if (!publishedOutputNames.has(outputKey)) continue;
|
|
33841
|
-
|
|
33882
|
+
run.outputsTemplateSource[outputKey] = output.Value;
|
|
33842
33883
|
}
|
|
33843
|
-
|
|
33844
|
-
|
|
33845
|
-
|
|
33884
|
+
run.skippedOutputs = collectSkippedOutputs(digestSource, outputs);
|
|
33885
|
+
run.outputsResolvedThisRun.add(outputs);
|
|
33886
|
+
run.resolvedOutputsBag = outputs;
|
|
33846
33887
|
return markSameGenerationBag(outputs);
|
|
33847
33888
|
}
|
|
33848
33889
|
function buildDisplayOutputs(template, resolvedOutputs) {
|
|
@@ -37551,13 +37592,414 @@ function makeSiblingClaimReader(params) {
|
|
|
37551
37592
|
};
|
|
37552
37593
|
}
|
|
37553
37594
|
|
|
37595
|
+
//#endregion
|
|
37596
|
+
//#region src/deployment/read-only-attribute-healer.ts
|
|
37597
|
+
async function readRecordAttributes(input) {
|
|
37598
|
+
const { provider, logicalId, resource, stackName, region } = input;
|
|
37599
|
+
if (!provider.import) return { kind: "not-attempted" };
|
|
37600
|
+
if (!hasAddressablePhysicalId(resource)) return { kind: "not-attempted" };
|
|
37601
|
+
const found = await provider.import({
|
|
37602
|
+
logicalId,
|
|
37603
|
+
resourceType: resource.resourceType,
|
|
37604
|
+
stackName,
|
|
37605
|
+
region,
|
|
37606
|
+
properties: resource.properties,
|
|
37607
|
+
knownPhysicalId: resource.physicalId
|
|
37608
|
+
});
|
|
37609
|
+
if (found === null) return { kind: "not-found" };
|
|
37610
|
+
if (found.physicalId !== resource.physicalId) throw new Error(`the provider answered for a different resource (${found.physicalId}) than the one asked about (${resource.physicalId})`);
|
|
37611
|
+
const reported = Object.entries(normalizeHealedAttributes(found.attributes));
|
|
37612
|
+
const attributes = Object.fromEntries(reported.filter(([, value]) => !carriesSecretMask(value)));
|
|
37613
|
+
const withheldKeys = reported.filter(([, value]) => carriesSecretMask(value)).map(([key]) => key);
|
|
37614
|
+
return {
|
|
37615
|
+
kind: "read",
|
|
37616
|
+
attributes,
|
|
37617
|
+
...withheldKeys.length > 0 && { withheldKeys }
|
|
37618
|
+
};
|
|
37619
|
+
}
|
|
37620
|
+
function createReadOnlyAttributeHealerFactory(options) {
|
|
37621
|
+
const logger = getLogger().child("ReadOnlyAttributeHealer");
|
|
37622
|
+
const memo = /* @__PURE__ */ new Map();
|
|
37623
|
+
const readOnce = (stackName, region, logicalId, resource) => {
|
|
37624
|
+
let key;
|
|
37625
|
+
try {
|
|
37626
|
+
if (isHealExcludedType(resource.resourceType)) return Promise.resolve({ kind: "not-attempted" });
|
|
37627
|
+
key = injectiveKey(stackName, region, logicalId, resource.physicalId);
|
|
37628
|
+
} catch (error) {
|
|
37629
|
+
return Promise.resolve({
|
|
37630
|
+
kind: "failed",
|
|
37631
|
+
error
|
|
37632
|
+
});
|
|
37633
|
+
}
|
|
37634
|
+
const inFlight = memo.get(key);
|
|
37635
|
+
if (inFlight) return inFlight;
|
|
37636
|
+
const heal = (async () => options.inRegion(region, () => readRecordAttributes({
|
|
37637
|
+
provider: options.getProvider(resource, region),
|
|
37638
|
+
logicalId,
|
|
37639
|
+
resource,
|
|
37640
|
+
stackName,
|
|
37641
|
+
region
|
|
37642
|
+
})))().then((outcome) => {
|
|
37643
|
+
if (outcome.kind === "read") try {
|
|
37644
|
+
logger.debug(safeMsg`Re-read the attributes of ${displaySafe(logicalId)} (${displaySafe(resource.resourceType)}) from AWS for this preview — its state record lacked one a Fn::GetAtt asked for; nothing is written: ${Object.keys(outcome.attributes).length} attribute(s) read`);
|
|
37645
|
+
} catch {}
|
|
37646
|
+
return outcome;
|
|
37647
|
+
}).catch((error) => ({
|
|
37648
|
+
kind: "failed",
|
|
37649
|
+
error
|
|
37650
|
+
}));
|
|
37651
|
+
memo.set(key, heal);
|
|
37652
|
+
return heal;
|
|
37653
|
+
};
|
|
37654
|
+
return (stackName, region) => Object.assign((logicalId, resource) => readOnce(stackName, region, logicalId, resource), { readOnly: true });
|
|
37655
|
+
}
|
|
37656
|
+
|
|
37657
|
+
//#endregion
|
|
37658
|
+
//#region src/deployment/deploy-engine/noecho.ts
|
|
37659
|
+
var NoEchoRunState = class {
|
|
37660
|
+
noEchoAttributeResources = /* @__PURE__ */ new Map();
|
|
37661
|
+
persistedNoEchoAttributes = /* @__PURE__ */ new Map();
|
|
37662
|
+
noEchoConditions = void 0;
|
|
37663
|
+
inheritedNoEchoParameters = /* @__PURE__ */ new Set();
|
|
37664
|
+
noEchoPhysicalIdWarned = /* @__PURE__ */ new Set();
|
|
37665
|
+
noEchoPositionedValues = /* @__PURE__ */ new Map();
|
|
37666
|
+
noEchoExactEchoes = /* @__PURE__ */ new Map();
|
|
37667
|
+
noEchoAttributeReads = /* @__PURE__ */ new Map();
|
|
37668
|
+
witnessConfirmedLeaves = /* @__PURE__ */ new Map();
|
|
37669
|
+
constructPathTemplate = void 0;
|
|
37670
|
+
};
|
|
37671
|
+
function noEchoExactEchoLeavesOf(record) {
|
|
37672
|
+
const field = record?.noEchoExactEchoLeaves;
|
|
37673
|
+
if (!Array.isArray(field)) return void 0;
|
|
37674
|
+
const out = [];
|
|
37675
|
+
for (const entry of field) {
|
|
37676
|
+
if (!Array.isArray(entry) || entry.length === 0) return void 0;
|
|
37677
|
+
if (!entry.every((segment) => typeof segment === "string")) return void 0;
|
|
37678
|
+
out.push([...entry]);
|
|
37679
|
+
}
|
|
37680
|
+
return out;
|
|
37681
|
+
}
|
|
37682
|
+
function echoFidelityCandidates(coordinates, resolved, createOnly) {
|
|
37683
|
+
const out = [];
|
|
37684
|
+
for (const coordinate of coordinates) {
|
|
37685
|
+
if (!coordinate.every((segment) => typeof segment === "string")) continue;
|
|
37686
|
+
const keys = coordinate;
|
|
37687
|
+
if (!createOnly.some((path) => path.length <= keys.length && path.every((s, i) => s === keys[i]))) continue;
|
|
37688
|
+
const plaintext = valueAtCoordinate(resolved, keys);
|
|
37689
|
+
if (typeof plaintext !== "string" || carriesSecretMask(plaintext)) continue;
|
|
37690
|
+
out.push({
|
|
37691
|
+
coordinate: keys,
|
|
37692
|
+
plaintext
|
|
37693
|
+
});
|
|
37694
|
+
}
|
|
37695
|
+
return out;
|
|
37696
|
+
}
|
|
37697
|
+
function reportedLeafAt(live, handed, candidate) {
|
|
37698
|
+
if (valueAtCoordinate(handed, candidate.coordinate) !== "***") return void 0;
|
|
37699
|
+
const leaf = valueAtCoordinate(live, candidate.coordinate);
|
|
37700
|
+
return typeof leaf === "string" && !carriesSecretMask(leaf) ? leaf : void 0;
|
|
37701
|
+
}
|
|
37702
|
+
function echoesExactlyAt(live, handed, candidate) {
|
|
37703
|
+
return reportedLeafAt(live, handed, candidate) === candidate.plaintext;
|
|
37704
|
+
}
|
|
37705
|
+
function provesEchoChangeAt(live, handed, candidate) {
|
|
37706
|
+
const reported = reportedLeafAt(live, handed, candidate);
|
|
37707
|
+
return reported !== void 0 && reported !== candidate.plaintext;
|
|
37708
|
+
}
|
|
37709
|
+
function noteNoEchoExactEchoes(run, logicalId, physicalId, read, handed, candidates, mode) {
|
|
37710
|
+
const exact = "failure" in read ? [] : candidates.filter((candidate) => echoesExactlyAt(read.live, handed, candidate)).map((candidate) => [...candidate.coordinate]);
|
|
37711
|
+
const noted = run.noEchoExactEchoes.get(logicalId);
|
|
37712
|
+
const previous = mode === "add" && noted?.physicalId === physicalId ? noted.coordinates : [];
|
|
37713
|
+
run.noEchoExactEchoes.set(logicalId, {
|
|
37714
|
+
physicalId,
|
|
37715
|
+
coordinates: sortedCoordinates([...previous, ...exact])
|
|
37716
|
+
});
|
|
37717
|
+
}
|
|
37718
|
+
function sortedCoordinates(coordinates) {
|
|
37719
|
+
const keyed = /* @__PURE__ */ new Map();
|
|
37720
|
+
for (const coordinate of coordinates) keyed.set(JSON.stringify(coordinate), [...coordinate]);
|
|
37721
|
+
return [...keyed.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([, c]) => c);
|
|
37722
|
+
}
|
|
37723
|
+
async function establishNoEchoEchoFidelity(run, deps, logicalId, record, resolvedProps, stateResources, secrets) {
|
|
37724
|
+
run.noEchoExactEchoes.delete(logicalId);
|
|
37725
|
+
const templateProps = deps.perResourceTemplateProps().get(logicalId);
|
|
37726
|
+
const sources = noEchoPositionSources(run, stateResources);
|
|
37727
|
+
if (templateProps === void 0 || sources === void 0 || sources.parameters.size === 0) return;
|
|
37728
|
+
const coordinates = canonicalCoordinates(noEchoCoordinatesOf(templateProps, resolvedProps, {
|
|
37729
|
+
parameters: sources.parameters,
|
|
37730
|
+
...sources.conditions !== void 0 && { conditions: sources.conditions }
|
|
37731
|
+
}));
|
|
37732
|
+
if (coordinates.length === 0) return;
|
|
37733
|
+
const candidates = echoFidelityCandidates(coordinates, resolvedProps, await getCreateOnlyPropertyPaths(record.resourceType).catch(() => []));
|
|
37734
|
+
if (candidates.length === 0) return;
|
|
37735
|
+
const handed = {
|
|
37736
|
+
...record,
|
|
37737
|
+
properties: maskAtCoordinates(record.properties, coordinates)
|
|
37738
|
+
};
|
|
37739
|
+
const read = await deps.readReaderForFreshNoEchoCeiling(logicalId, handed, secrets);
|
|
37740
|
+
noteNoEchoExactEchoes(run, logicalId, record.physicalId, read, handed.properties, candidates, "set");
|
|
37741
|
+
}
|
|
37742
|
+
function withNoEchoExactEchoes(run, logicalId, record) {
|
|
37743
|
+
const noted = run.noEchoExactEchoes.get(logicalId);
|
|
37744
|
+
if (noted === void 0 || noted.coordinates.length === 0) return record;
|
|
37745
|
+
if (noted.physicalId !== record.physicalId) return record;
|
|
37746
|
+
const merged = sortedCoordinates([...noEchoExactEchoLeavesOf(record) ?? [], ...noted.coordinates]);
|
|
37747
|
+
return {
|
|
37748
|
+
...record,
|
|
37749
|
+
noEchoExactEchoLeaves: merged
|
|
37750
|
+
};
|
|
37751
|
+
}
|
|
37752
|
+
function noEchoParameterNamesOf(template) {
|
|
37753
|
+
const names = /* @__PURE__ */ new Set();
|
|
37754
|
+
const declared = template?.Parameters;
|
|
37755
|
+
if (declared === null || typeof declared !== "object") return names;
|
|
37756
|
+
for (const [name, definition] of Object.entries(declared)) if (declaresNoEcho(definition)) names.add(name);
|
|
37757
|
+
return names;
|
|
37758
|
+
}
|
|
37759
|
+
function noEchoAttributeNamesOf(record) {
|
|
37760
|
+
const field = record?.noEchoAttributeNames;
|
|
37761
|
+
if (!Array.isArray(field) || !field.every((name) => typeof name === "string")) return void 0;
|
|
37762
|
+
return field;
|
|
37763
|
+
}
|
|
37764
|
+
function noEchoPositionSources(run, resources = {}, template = run.constructPathTemplate, conditions = run.noEchoConditions) {
|
|
37765
|
+
if (template === void 0) return void 0;
|
|
37766
|
+
const declared = run.noEchoAttributeResources;
|
|
37767
|
+
return {
|
|
37768
|
+
parameters: /* @__PURE__ */ new Set([...noEchoParameterNamesOf(template), ...run.inheritedNoEchoParameters]),
|
|
37769
|
+
attributeIsNoEcho: (logicalId, attribute) => {
|
|
37770
|
+
const live = declared.get(logicalId);
|
|
37771
|
+
if (live === true || live !== void 0 && live.has(attribute)) return true;
|
|
37772
|
+
if (noEchoAttributeNamesOf(Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0)?.includes(attribute) === true) return true;
|
|
37773
|
+
return run.persistedNoEchoAttributes.get(logicalId)?.has(attribute) === true;
|
|
37774
|
+
},
|
|
37775
|
+
...conditions !== void 0 && { conditions }
|
|
37776
|
+
};
|
|
37777
|
+
}
|
|
37778
|
+
function noEchoLeavesFor(run, deps, logicalId, record, templateProps, sources) {
|
|
37779
|
+
if (templateProps !== void 0 && isWrittenFromDeployedTemplate(record.properties)) return canonicalCoordinates(noEchoCoordinatesOf(templateProps, record.properties, sources));
|
|
37780
|
+
const existing = noEchoLeavesOf(record);
|
|
37781
|
+
if (existing !== void 0) {
|
|
37782
|
+
const confirmed = run.witnessConfirmedLeaves.get(logicalId) ?? [];
|
|
37783
|
+
return canonicalCoordinates([...existing, ...confirmed]);
|
|
37784
|
+
}
|
|
37785
|
+
const resolvedAsSame = deps.perResourceResolvedType().get(logicalId) === record.resourceType;
|
|
37786
|
+
const source = (templateProps !== void 0 && resolvedAsSame ? templateProps : void 0) ?? templatePropertiesFor(run, logicalId, record.resourceType);
|
|
37787
|
+
if (source === void 0) return void 0;
|
|
37788
|
+
return canonicalCoordinates(noEchoCoordinatesOf(source, record.properties, sources));
|
|
37789
|
+
}
|
|
37790
|
+
function templatePropertiesFor(run, logicalId, resourceType) {
|
|
37791
|
+
const resources = run.constructPathTemplate?.Resources;
|
|
37792
|
+
if (resources === void 0 || !Object.hasOwn(resources, logicalId)) return void 0;
|
|
37793
|
+
const definition = resources[logicalId];
|
|
37794
|
+
if (definition?.Type !== resourceType) return void 0;
|
|
37795
|
+
const properties = definition.Properties;
|
|
37796
|
+
return properties !== null && typeof properties === "object" && !Array.isArray(properties) ? properties : void 0;
|
|
37797
|
+
}
|
|
37798
|
+
function noEchoAttributeNamesFor(run, logicalId, record, carried, leaves) {
|
|
37799
|
+
const attributes = record.attributes ?? {};
|
|
37800
|
+
const names = /* @__PURE__ */ new Set();
|
|
37801
|
+
let echoed = false;
|
|
37802
|
+
for (const coordinate of leaves ?? []) {
|
|
37803
|
+
const value = valueAtCoordinate(record.properties, coordinate);
|
|
37804
|
+
if (value === void 0 || carriesSecretMask(value)) continue;
|
|
37805
|
+
for (const [name, attribute] of Object.entries(attributes)) {
|
|
37806
|
+
if (carriesSecretMask(attribute)) continue;
|
|
37807
|
+
if (typeof attribute === "string" && attribute === record.physicalId) continue;
|
|
37808
|
+
const sameName = coordinate[0] === name && keyOrderFreeJson(attribute) === keyOrderFreeJson(value);
|
|
37809
|
+
const embeds = typeof value === "string" && typeof attribute === "string" && !attribute.startsWith("arn:") && value.length >= 4 && typeof attribute === "string" && attribute.includes(value);
|
|
37810
|
+
if (sameName || embeds) {
|
|
37811
|
+
names.add(name);
|
|
37812
|
+
echoed = true;
|
|
37813
|
+
}
|
|
37814
|
+
}
|
|
37815
|
+
}
|
|
37816
|
+
const declared = carried ? void 0 : run.noEchoAttributeResources.get(logicalId);
|
|
37817
|
+
if (declared === true) for (const name of Object.keys(attributes)) names.add(name);
|
|
37818
|
+
else if (declared !== void 0) {
|
|
37819
|
+
for (const name of declared) if (Object.hasOwn(attributes, name)) names.add(name);
|
|
37820
|
+
}
|
|
37821
|
+
const prior = noEchoAttributeNamesOf(record);
|
|
37822
|
+
for (const name of prior ?? []) if (Object.hasOwn(attributes, name) && carriesSecretMask(attributes[name])) names.add(name);
|
|
37823
|
+
if (declared === void 0 && prior === void 0 && !echoed) return void 0;
|
|
37824
|
+
return [...names].sort();
|
|
37825
|
+
}
|
|
37826
|
+
function applyNoEchoPersist(run, deps, logicalId, record, scrubbed, templateProps, resources, secrets, carried = false) {
|
|
37827
|
+
const sources = noEchoPositionSources(run, resources);
|
|
37828
|
+
if (sources === void 0) return scrubbed;
|
|
37829
|
+
const leaves = noEchoLeavesFor(run, deps, logicalId, record, templateProps, sources);
|
|
37830
|
+
const names = noEchoAttributeNamesFor(run, logicalId, record, carried, leaves);
|
|
37831
|
+
if (leaves === void 0 && names === void 0) return scrubbed;
|
|
37832
|
+
const next = { ...scrubbed };
|
|
37833
|
+
if (leaves !== void 0) {
|
|
37834
|
+
next.properties = maskAtCoordinates(scrubbed.properties, leaves);
|
|
37835
|
+
if (scrubbed.observedProperties !== void 0 && leaves.length > 0) Object.assign(next, { observedProperties: maskReadbackAtCoordinates(scrubbed.observedProperties, record.properties, leaves) });
|
|
37836
|
+
if (leaves.length > 0) next.noEchoLeaves = leaves;
|
|
37837
|
+
else delete next.noEchoLeaves;
|
|
37838
|
+
const marked = new Set(leaves.map((coordinate) => JSON.stringify(coordinate)));
|
|
37839
|
+
const exact = (noEchoExactEchoLeavesOf(scrubbed) ?? []).filter((coordinate) => marked.has(JSON.stringify(coordinate)));
|
|
37840
|
+
if (exact.length > 0) next.noEchoExactEchoLeaves = exact;
|
|
37841
|
+
else delete next.noEchoExactEchoLeaves;
|
|
37842
|
+
}
|
|
37843
|
+
if (names !== void 0) {
|
|
37844
|
+
if (scrubbed.attributes !== void 0 && names.length > 0) {
|
|
37845
|
+
const attributes = { ...scrubbed.attributes };
|
|
37846
|
+
for (const name of names) if (Object.hasOwn(attributes, name)) attributes[name] = maskWholeValue(attributes[name]);
|
|
37847
|
+
next.attributes = attributes;
|
|
37848
|
+
}
|
|
37849
|
+
if (names.length > 0) next.noEchoAttributeNames = names;
|
|
37850
|
+
else delete next.noEchoAttributeNames;
|
|
37851
|
+
}
|
|
37852
|
+
warnNoEchoPhysicalId(run, deps, logicalId, record, secrets);
|
|
37853
|
+
return next;
|
|
37854
|
+
}
|
|
37855
|
+
function warnNoEchoPhysicalId(run, deps, logicalId, record, secrets) {
|
|
37856
|
+
if (secrets === void 0 || run.noEchoPhysicalIdWarned.has(logicalId)) return;
|
|
37857
|
+
const values = noEchoParameterPlaintextsOf(secrets);
|
|
37858
|
+
if (values.length === 0 || typeof record.physicalId !== "string") return;
|
|
37859
|
+
if (!values.some((value) => record.physicalId.includes(value))) return;
|
|
37860
|
+
run.noEchoPhysicalIdWarned.add(logicalId);
|
|
37861
|
+
deps.logger.warn(deps.maskForResource(logicalId, safeMsg`${logicalId}: its physical id contains a NoEcho parameter value. AWS publishes a resource's name, so cdkd keeps the physical id in state as AWS returns it.`));
|
|
37862
|
+
}
|
|
37863
|
+
function seedPersistedNoEchoAttributes(run, resources) {
|
|
37864
|
+
run.persistedNoEchoAttributes = /* @__PURE__ */ new Map();
|
|
37865
|
+
for (const [logicalId, record] of Object.entries(resources)) {
|
|
37866
|
+
const names = noEchoAttributeNamesOf(record);
|
|
37867
|
+
if (names !== void 0 && names.length > 0) run.persistedNoEchoAttributes.set(logicalId, new Set(names));
|
|
37868
|
+
}
|
|
37869
|
+
}
|
|
37870
|
+
function maskOutputsByPosition(run, deps, outputs) {
|
|
37871
|
+
const sources = noEchoPositionSources(run);
|
|
37872
|
+
if (sources === void 0) return outputs;
|
|
37873
|
+
const templateValues = Object.create(null);
|
|
37874
|
+
for (const [name, definition] of Object.entries(run.constructPathTemplate?.Outputs ?? {})) templateValues[name] = definition?.Value;
|
|
37875
|
+
if (deps.outputsRun().outputsSourceUsable) for (const [name, value] of Object.entries(deps.outputsRun().outputsTemplateSource)) templateValues[name] = value;
|
|
37876
|
+
const coordinates = noEchoCoordinatesOf(templateValues, outputs, sources);
|
|
37877
|
+
if (coordinates.length === 0) return outputs;
|
|
37878
|
+
const maskedValues = new Set(coordinates.filter((coordinate) => coordinate.length === 1 && typeof coordinate[0] === "string").map((coordinate) => keyOrderFreeJson(outputs[coordinate[0]])));
|
|
37879
|
+
const aliasCoordinates = Object.keys(outputs).filter((key) => !Object.hasOwn(templateValues, key) && outputs[key] !== void 0 && !carriesSecretMask(outputs[key]) && maskedValues.has(keyOrderFreeJson(outputs[key]))).map((key) => [key]);
|
|
37880
|
+
return maskAtCoordinates(outputs, [...coordinates, ...aliasCoordinates]);
|
|
37881
|
+
}
|
|
37882
|
+
function getAttTargetsOf(node) {
|
|
37883
|
+
const targets = [];
|
|
37884
|
+
const seen = /* @__PURE__ */ new Set();
|
|
37885
|
+
const subVariable = /\$\{([^}!][^}]*)\}/g;
|
|
37886
|
+
const walk = (value) => {
|
|
37887
|
+
if (value === null || typeof value !== "object" || seen.has(value)) return;
|
|
37888
|
+
seen.add(value);
|
|
37889
|
+
if (Array.isArray(value)) {
|
|
37890
|
+
for (const item of value) walk(item);
|
|
37891
|
+
return;
|
|
37892
|
+
}
|
|
37893
|
+
const record = value;
|
|
37894
|
+
const getAtt = record["Fn::GetAtt"];
|
|
37895
|
+
if (typeof getAtt === "string" && getAtt.indexOf(".") > 0) {
|
|
37896
|
+
const dot = getAtt.indexOf(".");
|
|
37897
|
+
targets.push([getAtt.slice(0, dot), getAtt.slice(dot + 1)]);
|
|
37898
|
+
} else if (Array.isArray(getAtt) && typeof getAtt[0] === "string" && typeof getAtt[1] === "string") targets.push([getAtt[0], getAtt[1]]);
|
|
37899
|
+
const sub = record["Fn::Sub"];
|
|
37900
|
+
const text = typeof sub === "string" ? sub : Array.isArray(sub) ? sub[0] : void 0;
|
|
37901
|
+
if (typeof text === "string") for (const match of text.matchAll(subVariable)) {
|
|
37902
|
+
const name = match[1].trim();
|
|
37903
|
+
const dot = name.indexOf(".");
|
|
37904
|
+
if (dot > 0) targets.push([name.slice(0, dot), name.slice(dot + 1)]);
|
|
37905
|
+
}
|
|
37906
|
+
for (const child of Object.values(record)) walk(child);
|
|
37907
|
+
};
|
|
37908
|
+
walk(node);
|
|
37909
|
+
return targets;
|
|
37910
|
+
}
|
|
37911
|
+
async function noEchoAttributeOverridesFor(run, deps, desiredProps, stateResources, stackName) {
|
|
37912
|
+
const wanted = /* @__PURE__ */ new Map();
|
|
37913
|
+
for (const [logicalId, attribute] of getAttTargetsOf(desiredProps)) {
|
|
37914
|
+
const record = Object.hasOwn(stateResources, logicalId) ? stateResources[logicalId] : void 0;
|
|
37915
|
+
if (record === void 0) continue;
|
|
37916
|
+
if (noEchoAttributeNamesOf(record)?.includes(attribute) !== true) continue;
|
|
37917
|
+
if (!carriesSecretMask(record.attributes?.[attribute])) continue;
|
|
37918
|
+
if (!deps.perResourceSecrets().has(logicalId)) continue;
|
|
37919
|
+
const set = wanted.get(logicalId) ?? /* @__PURE__ */ new Set();
|
|
37920
|
+
set.add(attribute);
|
|
37921
|
+
wanted.set(logicalId, set);
|
|
37922
|
+
}
|
|
37923
|
+
if (wanted.size === 0) return void 0;
|
|
37924
|
+
const overrides = /* @__PURE__ */ new Map();
|
|
37925
|
+
for (const [logicalId, attributes] of wanted) {
|
|
37926
|
+
const record = stateResources[logicalId];
|
|
37927
|
+
let read = run.noEchoAttributeReads.get(logicalId);
|
|
37928
|
+
if (read === void 0) {
|
|
37929
|
+
read = (async () => {
|
|
37930
|
+
try {
|
|
37931
|
+
const { provider } = deps.providerRegistry.getProviderFor({
|
|
37932
|
+
resourceType: record.resourceType,
|
|
37933
|
+
properties: record.properties,
|
|
37934
|
+
provisionedBy: record.provisionedBy,
|
|
37935
|
+
previousProperties: record.properties
|
|
37936
|
+
});
|
|
37937
|
+
const outcome = await readRecordAttributes({
|
|
37938
|
+
provider,
|
|
37939
|
+
logicalId,
|
|
37940
|
+
resource: record,
|
|
37941
|
+
stackName,
|
|
37942
|
+
region: deps.stackRegion
|
|
37943
|
+
});
|
|
37944
|
+
return outcome.kind === "read" ? outcome.attributes : void 0;
|
|
37945
|
+
} catch {
|
|
37946
|
+
return;
|
|
37947
|
+
}
|
|
37948
|
+
})();
|
|
37949
|
+
run.noEchoAttributeReads.set(logicalId, read);
|
|
37950
|
+
}
|
|
37951
|
+
const live = await read;
|
|
37952
|
+
if (live === void 0) continue;
|
|
37953
|
+
const secrets = deps.perResourceSecrets().get(logicalId);
|
|
37954
|
+
const fresh = noEchoParameterPlaintextsOf(secrets);
|
|
37955
|
+
const positioned = run.noEchoPositionedValues.get(logicalId) ?? /* @__PURE__ */ new Set();
|
|
37956
|
+
const served = {};
|
|
37957
|
+
for (const attribute of attributes) {
|
|
37958
|
+
if (!Object.hasOwn(live, attribute)) continue;
|
|
37959
|
+
const value = live[attribute];
|
|
37960
|
+
if (typeof value === "string" && fresh.some((needle) => value === needle || value.includes(needle)) || value !== void 0 && positioned.has(keyOrderFreeJson(value))) served[attribute] = value;
|
|
37961
|
+
}
|
|
37962
|
+
if (Object.keys(served).length > 0) overrides.set(logicalId, served);
|
|
37963
|
+
}
|
|
37964
|
+
return overrides.size > 0 ? overrides : void 0;
|
|
37965
|
+
}
|
|
37966
|
+
function noEchoDiffComparison(run, deps, resources, template, conditions, parameterValues, stackName) {
|
|
37967
|
+
const sources = noEchoPositionSources(run, resources, template, conditions);
|
|
37968
|
+
if (sources === void 0) return void 0;
|
|
37969
|
+
const compare = noEchoComparison({
|
|
37970
|
+
sources,
|
|
37971
|
+
values: parameterValues,
|
|
37972
|
+
minNeedleLength: 4,
|
|
37973
|
+
publicTokens: /* @__PURE__ */ new Set([deps.stackRegion, ...stackName === void 0 ? [] : [stackName]])
|
|
37974
|
+
});
|
|
37975
|
+
return (input) => compare(input);
|
|
37976
|
+
}
|
|
37977
|
+
function freshNoEchoParametersWithDeclared(inherited, template) {
|
|
37978
|
+
const all = /* @__PURE__ */ new Set([...inherited ?? [], ...noEchoParameterNamesOf(template)]);
|
|
37979
|
+
return all.size > 0 ? all : void 0;
|
|
37980
|
+
}
|
|
37981
|
+
function noEchoComparisonForTemplate(template, knownConditions, values, resources, publicTokens, inheritedNoEchoParameters) {
|
|
37982
|
+
const sources = {
|
|
37983
|
+
parameters: /* @__PURE__ */ new Set([...noEchoParameterNamesOf(template), ...inheritedNoEchoParameters ?? []]),
|
|
37984
|
+
attributeIsNoEcho: (logicalId, attribute) => noEchoAttributeNamesOf(Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0)?.includes(attribute) === true,
|
|
37985
|
+
...knownConditions !== void 0 && { conditions: knownConditions }
|
|
37986
|
+
};
|
|
37987
|
+
const compare = noEchoComparison({
|
|
37988
|
+
sources,
|
|
37989
|
+
values: values ?? {},
|
|
37990
|
+
minNeedleLength: 4,
|
|
37991
|
+
...publicTokens !== void 0 && { publicTokens }
|
|
37992
|
+
});
|
|
37993
|
+
return (input) => compare(input);
|
|
37994
|
+
}
|
|
37995
|
+
|
|
37554
37996
|
//#endregion
|
|
37555
37997
|
//#region src/deployment/deploy-engine/rollback.ts
|
|
37556
37998
|
function redactOperationsForJournal(operations) {
|
|
37557
37999
|
return operations.map((op) => {
|
|
37558
38000
|
const secrets = this.perResourceSecrets.get(op.logicalId);
|
|
37559
38001
|
const templateProps = this.perResourceTemplateProps.get(op.logicalId);
|
|
37560
|
-
const sources = templateProps === void 0 ? void 0 : this.
|
|
38002
|
+
const sources = templateProps === void 0 ? void 0 : noEchoPositionSources(this.noEchoRun);
|
|
37561
38003
|
const byPosition = (bag) => sources === void 0 || templateProps === void 0 ? bag : maskAtCoordinates(bag, noEchoCoordinatesOf(templateProps, bag, sources));
|
|
37562
38004
|
if ((!secrets || secrets.size === 0) && !op.previousState && sources === void 0) return op;
|
|
37563
38005
|
const ownSecrets = secrets ?? /* @__PURE__ */ new Map();
|
|
@@ -37568,7 +38010,7 @@ function redactOperationsForJournal(operations) {
|
|
|
37568
38010
|
const previous = next.previousState;
|
|
37569
38011
|
const adopted = adoptedOrphanRecords.get(this);
|
|
37570
38012
|
const loaded = adopted?.has(op.logicalId) ? adopted.get(op.logicalId) : previous;
|
|
37571
|
-
next.previousState = this.
|
|
38013
|
+
next.previousState = applyNoEchoPersist(this.noEchoRun, this.noEchoDeps(), op.logicalId, previous, keepPersistedPlainRecordLeaves(scrubResourceRecord(previous, ownSecrets, void 0, STATE_SOURCED_READBACK_RULES), previous, loaded ?? {}), void 0, {}, void 0, true);
|
|
37572
38014
|
}
|
|
37573
38015
|
return next;
|
|
37574
38016
|
});
|
|
@@ -37704,7 +38146,7 @@ function foreignHolderResolver(engine) {
|
|
|
37704
38146
|
async function settleJournalAfterSuccess(stackName, completedOperations, previousState, finalResources, initialDeploy) {
|
|
37705
38147
|
if (this.options.parentStackInfo) {
|
|
37706
38148
|
await this.writeRollbackJournalSegment(stackName, completedOperations, [], NESTED_PENDING_PARENT_REASON, initialDeploy, nestedPendingSnapshot(previousState, (name) => {
|
|
37707
|
-
const verdict = this.carriedExportAliasRefusal;
|
|
38149
|
+
const verdict = this.outputsRun.carriedExportAliasRefusal;
|
|
37708
38150
|
const dropped = verdict === void 0 || verdict(name, name) !== void 0;
|
|
37709
38151
|
if (dropped) this.logger.warn(verdict === void 0 ? "An export alias the previous record published was not kept for a revert of this nested stack: no export-name verdict is available." : "An export alias the previous record published was not kept for a revert of this nested stack: its name contains a NoEcho value.");
|
|
37710
38152
|
return dropped;
|
|
@@ -37876,7 +38318,7 @@ async function writeRollbackJournalSegment(stackName, completedOperations, faile
|
|
|
37876
38318
|
...redactedFailed.length > 0 && { failedOperations: redactedFailed },
|
|
37877
38319
|
...nestedPending?.previousOutputs && { previousOutputs: {
|
|
37878
38320
|
...nestedPending.previousOutputs,
|
|
37879
|
-
outputs: this.
|
|
38321
|
+
outputs: maskOutputsByPosition(this.noEchoRun, this.noEchoDeps(), nestedPending.previousOutputs.outputs)
|
|
37880
38322
|
} },
|
|
37881
38323
|
...nestedPending?.previousCrossStackReads && { previousCrossStackReads: nestedPending.previousCrossStackReads }
|
|
37882
38324
|
};
|
|
@@ -38209,42 +38651,158 @@ function recaptureMaskedBaseline(args) {
|
|
|
38209
38651
|
|
|
38210
38652
|
//#endregion
|
|
38211
38653
|
//#region src/deployment/deploy-engine/observed-capture.ts
|
|
38212
|
-
|
|
38213
|
-
|
|
38214
|
-
|
|
38215
|
-
|
|
38216
|
-
|
|
38217
|
-
|
|
38218
|
-
|
|
38219
|
-
|
|
38220
|
-
|
|
38221
|
-
|
|
38222
|
-
|
|
38223
|
-
|
|
38224
|
-
|
|
38225
|
-
|
|
38226
|
-
|
|
38227
|
-
|
|
38228
|
-
|
|
38229
|
-
|
|
38230
|
-
|
|
38231
|
-
|
|
38232
|
-
|
|
38233
|
-
|
|
38234
|
-
|
|
38235
|
-
|
|
38236
|
-
const
|
|
38237
|
-
|
|
38238
|
-
const
|
|
38239
|
-
|
|
38240
|
-
|
|
38241
|
-
|
|
38242
|
-
|
|
38243
|
-
|
|
38654
|
+
var ObservedCapture = class {
|
|
38655
|
+
observedCaptureTasks = /* @__PURE__ */ new Map();
|
|
38656
|
+
recapturedBaselines = /* @__PURE__ */ new WeakMap();
|
|
38657
|
+
deps;
|
|
38658
|
+
constructor(deps) {
|
|
38659
|
+
this.deps = deps;
|
|
38660
|
+
}
|
|
38661
|
+
kickOffObservedCapture(provider, logicalId, physicalId, resourceType, resolvedProps, context, secrets, maskAt) {
|
|
38662
|
+
if (this.deps.options.captureObservedState !== true) return;
|
|
38663
|
+
this.observedCaptureTasks.delete(logicalId);
|
|
38664
|
+
if (!provider.readCurrentState) return;
|
|
38665
|
+
const readCurrentState = provider.readCurrentState.bind(provider);
|
|
38666
|
+
const read = () => readCurrentState(physicalId, logicalId, resourceType, resolvedProps, context).then((observed) => observed === RESOURCE_NOT_FOUND ? void 0 : maskAt === void 0 || observed === void 0 || maskAt.coordinates.length === 0 ? observed : maskReadbackAtCoordinates(observed, maskAt.properties, maskAt.coordinates), (err) => {
|
|
38667
|
+
const mask = createUnionSecretMasker([
|
|
38668
|
+
secrets,
|
|
38669
|
+
this.deps.printingSecretsFor(logicalId),
|
|
38670
|
+
this.deps.fingerprintNoEchoValues()
|
|
38671
|
+
]);
|
|
38672
|
+
this.deps.logger.debug(safeMsg`observedProperties capture for ${mask(logicalId)} (${mask(resourceType)}) failed: ${asIsMessage(mask(err instanceof Error ? err.message : String(err)))} — drift will fall back to template properties for this resource until the next successful deploy.`);
|
|
38673
|
+
});
|
|
38674
|
+
const promise = secrets === void 0 ? read() : withCurrentResourceSecrets(secrets, read);
|
|
38675
|
+
this.observedCaptureTasks.set(logicalId, promise);
|
|
38676
|
+
}
|
|
38677
|
+
async drainObservedCaptures(stateResources) {
|
|
38678
|
+
const captured = await this.deps.provenanceCapture().drainProvenanceCaptures(stateResources);
|
|
38679
|
+
if (this.observedCaptureTasks.size === 0) return captured;
|
|
38680
|
+
const entries = Array.from(this.observedCaptureTasks.entries());
|
|
38681
|
+
this.observedCaptureTasks.clear();
|
|
38682
|
+
const resolved = await Promise.all(entries.map(([, p]) => p));
|
|
38683
|
+
let installed = 0;
|
|
38684
|
+
for (let i = 0; i < entries.length; i++) {
|
|
38685
|
+
const logicalId = entries[i][0];
|
|
38686
|
+
const observed = resolved[i];
|
|
38687
|
+
const target = stateResources[logicalId];
|
|
38688
|
+
const recapturedFrom = observed === void 0 ? void 0 : this.recapturedBaselines.get(observed);
|
|
38689
|
+
if (recapturedFrom !== void 0 && target?.observedProperties !== recapturedFrom) continue;
|
|
38690
|
+
if (target && observed !== void 0) {
|
|
38691
|
+
installed++;
|
|
38692
|
+
target.observedProperties = recapturedFrom !== void 0 ? observed : markSameGenerationBag({ ...observed });
|
|
38693
|
+
}
|
|
38694
|
+
}
|
|
38695
|
+
return installed + captured;
|
|
38696
|
+
}
|
|
38697
|
+
kickOffAutoRefreshObservedProperties(stateResources, crossStackReads) {
|
|
38698
|
+
if (this.deps.options.captureObservedState !== true) return;
|
|
38699
|
+
if (this.deps.options.dryRun === true) return;
|
|
38700
|
+
let toRefresh = 0;
|
|
38701
|
+
let refused = 0;
|
|
38702
|
+
const candidates = [];
|
|
38703
|
+
const masked = [];
|
|
38704
|
+
for (const [logicalId, resource] of Object.entries(stateResources)) {
|
|
38705
|
+
if (!hasAddressablePhysicalId(resource)) continue;
|
|
38706
|
+
if (resource.observedProperties !== void 0) {
|
|
38707
|
+
if (isMaskedBaselineRecaptureCandidate(resource)) masked.push({
|
|
38708
|
+
logicalId,
|
|
38709
|
+
resource
|
|
38710
|
+
});
|
|
38711
|
+
continue;
|
|
38712
|
+
}
|
|
38713
|
+
if (resource.observedBaselineRefused === true) {
|
|
38714
|
+
refused++;
|
|
38715
|
+
continue;
|
|
38716
|
+
}
|
|
38717
|
+
candidates.push({
|
|
38718
|
+
logicalId,
|
|
38719
|
+
resource
|
|
38720
|
+
});
|
|
38244
38721
|
}
|
|
38722
|
+
if (refused > 0) this.deps.logger.debug(safeMsg`observed-properties auto-refresh SKIPPED for ${refused} resource(s) whose baseline a 'cdkd import' run refused: their recorded properties cannot position the redaction, so capturing an AWS readback against them could persist a resolved secret in plaintext. A deploy that actually CHANGES one of them restores its baseline, unless the refusal is an unverifiable-parameter one (only a replacement or a proving re-import discharges that); a NO_CHANGE deploy never does.`);
|
|
38723
|
+
if (candidates.length === 0 && masked.length === 0) return;
|
|
38724
|
+
const allSiblings = {};
|
|
38725
|
+
for (const [lid, res] of Object.entries(stateResources)) allSiblings[lid] = {
|
|
38726
|
+
resourceType: res.resourceType,
|
|
38727
|
+
properties: res.properties ?? {}
|
|
38728
|
+
};
|
|
38729
|
+
for (const { logicalId, resource } of candidates) {
|
|
38730
|
+
let provider;
|
|
38731
|
+
try {
|
|
38732
|
+
provider = this.deps.providerRegistry.getProviderFor({
|
|
38733
|
+
resourceType: resource.resourceType,
|
|
38734
|
+
provisionedBy: resource.provisionedBy
|
|
38735
|
+
}).provider;
|
|
38736
|
+
} catch {
|
|
38737
|
+
continue;
|
|
38738
|
+
}
|
|
38739
|
+
if (!provider.readCurrentState) continue;
|
|
38740
|
+
const siblings = { ...allSiblings };
|
|
38741
|
+
delete siblings[logicalId];
|
|
38742
|
+
const recordProperties = resource.properties ?? {};
|
|
38743
|
+
const maskCoordinates = [...maskedLeafCoordinatesOf(recordProperties), ...noEchoLeavesOf(resource) ?? []];
|
|
38744
|
+
this.kickOffObservedCapture(provider, logicalId, resource.physicalId, resource.resourceType, recordProperties, { siblings }, void 0, maskCoordinates.length > 0 ? {
|
|
38745
|
+
properties: recordProperties,
|
|
38746
|
+
coordinates: maskCoordinates
|
|
38747
|
+
} : void 0);
|
|
38748
|
+
toRefresh++;
|
|
38749
|
+
}
|
|
38750
|
+
if (toRefresh > 0) this.deps.logger.warn(safeMsg`cdkd state schema upgrade detected — refreshing observed-properties baseline for ${toRefresh} resource(s) (one-time, runs in parallel with deploy)`);
|
|
38751
|
+
let producerRegions = [];
|
|
38752
|
+
if (masked.length > 0) try {
|
|
38753
|
+
producerRegions = producerRegionsFromState(crossStackReads);
|
|
38754
|
+
} catch {
|
|
38755
|
+
this.deps.logger.debug(safeMsg`Masked observed baseline re-capture skipped for ${masked.length} resource(s): the record's cross-stack reads could not be read.`);
|
|
38756
|
+
masked.length = 0;
|
|
38757
|
+
}
|
|
38758
|
+
for (const { logicalId, resource } of masked) {
|
|
38759
|
+
let provider;
|
|
38760
|
+
try {
|
|
38761
|
+
provider = this.deps.providerRegistry.getProviderFor({
|
|
38762
|
+
resourceType: resource.resourceType,
|
|
38763
|
+
provisionedBy: resource.provisionedBy
|
|
38764
|
+
}).provider;
|
|
38765
|
+
} catch {
|
|
38766
|
+
continue;
|
|
38767
|
+
}
|
|
38768
|
+
if (!provider.readCurrentState) continue;
|
|
38769
|
+
const siblings = { ...allSiblings };
|
|
38770
|
+
delete siblings[logicalId];
|
|
38771
|
+
this.kickOffMaskedBaselineRecapture(provider, logicalId, resource, producerRegions, { siblings });
|
|
38772
|
+
}
|
|
38773
|
+
}
|
|
38774
|
+
kickOffMaskedBaselineRecapture(provider, logicalId, resource, producerRegions, context) {
|
|
38775
|
+
const previous = resource.observedProperties;
|
|
38776
|
+
const readCurrentState = provider.readCurrentState?.bind(provider);
|
|
38777
|
+
if (previous === void 0 || readCurrentState === void 0) return;
|
|
38778
|
+
const properties = resource.properties ?? {};
|
|
38779
|
+
const task = (async () => {
|
|
38780
|
+
const secrets = await resolveRecordSecrets(properties, (token, own) => this.deps.resolver.resolveDynamicReferences(token, persistedTokenResolverContext(own, producerRegions)));
|
|
38781
|
+
if (secrets === void 0 || secrets.size === 0) {
|
|
38782
|
+
this.deps.logger.debug(safeMsg`Masked observed baseline of ${logicalId} kept: its recorded references did not all resolve to distinct values.`);
|
|
38783
|
+
return;
|
|
38784
|
+
}
|
|
38785
|
+
const readback = await withCurrentResourceSecrets(secrets, () => readCurrentState(resource.physicalId, logicalId, resource.resourceType, properties, context));
|
|
38786
|
+
if (readback === void 0 || readback === RESOURCE_NOT_FOUND) return void 0;
|
|
38787
|
+
const recaptured = recaptureMaskedBaseline({
|
|
38788
|
+
previous,
|
|
38789
|
+
readback,
|
|
38790
|
+
properties,
|
|
38791
|
+
secrets
|
|
38792
|
+
});
|
|
38793
|
+
if (recaptured === void 0) {
|
|
38794
|
+
this.deps.logger.debug(safeMsg`Masked observed baseline of ${logicalId} kept: no masked position could be certified, or the resource no longer reads back as its baseline records.`);
|
|
38795
|
+
return;
|
|
38796
|
+
}
|
|
38797
|
+
this.recapturedBaselines.set(recaptured, previous);
|
|
38798
|
+
this.deps.logger.debug(safeMsg`Re-captured the masked observed baseline of ${logicalId}.`);
|
|
38799
|
+
return recaptured;
|
|
38800
|
+
})().catch(() => {
|
|
38801
|
+
this.deps.logger.debug(safeMsg`Masked observed baseline of ${logicalId} kept: the re-capture failed.`);
|
|
38802
|
+
});
|
|
38803
|
+
this.observedCaptureTasks.set(logicalId, task);
|
|
38245
38804
|
}
|
|
38246
|
-
|
|
38247
|
-
}
|
|
38805
|
+
};
|
|
38248
38806
|
const STANDALONE_SIBLING = {
|
|
38249
38807
|
Roles: {
|
|
38250
38808
|
type: "AWS::IAM::RolePolicy",
|
|
@@ -38259,8 +38817,8 @@ const STANDALONE_SIBLING = {
|
|
|
38259
38817
|
field: "GroupName"
|
|
38260
38818
|
}
|
|
38261
38819
|
};
|
|
38262
|
-
async function buildObservedCaptureSiblings(resourceType, capturedLogicalId, capturedPhysicalId, template, stateResources, stackName, parameterValues, conditions) {
|
|
38263
|
-
if (
|
|
38820
|
+
async function buildObservedCaptureSiblings(deps, resourceType, capturedLogicalId, capturedPhysicalId, template, stateResources, stackName, parameterValues, conditions) {
|
|
38821
|
+
if (deps.options.captureObservedState !== true) return void 0;
|
|
38264
38822
|
const attachmentField = resourceType === "AWS::IAM::Role" ? "Roles" : resourceType === "AWS::IAM::User" ? "Users" : resourceType === "AWS::IAM::Group" ? "Groups" : void 0;
|
|
38265
38823
|
if (!attachmentField) return void 0;
|
|
38266
38824
|
const resources = template?.Resources;
|
|
@@ -38278,14 +38836,14 @@ async function buildObservedCaptureSiblings(resourceType, capturedLogicalId, cap
|
|
|
38278
38836
|
if (!attachments.some((a) => isRefTo(a, capturedLogicalId) || a === capturedPhysicalId)) continue;
|
|
38279
38837
|
let policyName = props["PolicyName"];
|
|
38280
38838
|
if (policyName !== void 0 && typeof policyName !== "string") {
|
|
38281
|
-
resolverContext ??=
|
|
38839
|
+
resolverContext ??= deps.buildResolverContext({
|
|
38282
38840
|
template,
|
|
38283
38841
|
resources: stateResources,
|
|
38284
38842
|
...parameterValues && { parameters: parameterValues },
|
|
38285
38843
|
...conditions && { conditions }
|
|
38286
38844
|
}, stackName);
|
|
38287
38845
|
try {
|
|
38288
|
-
policyName = await
|
|
38846
|
+
policyName = await deps.resolver.resolve(policyName, resolverContext);
|
|
38289
38847
|
} catch {
|
|
38290
38848
|
continue;
|
|
38291
38849
|
}
|
|
@@ -38301,7 +38859,7 @@ async function buildObservedCaptureSiblings(resourceType, capturedLogicalId, cap
|
|
|
38301
38859
|
}
|
|
38302
38860
|
return Object.keys(siblings).length > 0 ? { siblings } : void 0;
|
|
38303
38861
|
}
|
|
38304
|
-
function stampReasonlessParameterRefusals(stateResources, template) {
|
|
38862
|
+
function stampReasonlessParameterRefusals(logger, stateResources, template) {
|
|
38305
38863
|
let namesParameter;
|
|
38306
38864
|
let stamped = 0;
|
|
38307
38865
|
for (const [logicalId, resource] of Object.entries(stateResources)) {
|
|
@@ -38314,116 +38872,8 @@ function stampReasonlessParameterRefusals(stateResources, template) {
|
|
|
38314
38872
|
};
|
|
38315
38873
|
stamped++;
|
|
38316
38874
|
}
|
|
38317
|
-
if (namesParameter?.failedClosed !== void 0)
|
|
38318
|
-
if (stamped > 0)
|
|
38319
|
-
}
|
|
38320
|
-
function kickOffAutoRefreshObservedProperties(stateResources, crossStackReads) {
|
|
38321
|
-
if (this.options.captureObservedState !== true) return;
|
|
38322
|
-
if (this.options.dryRun === true) return;
|
|
38323
|
-
let toRefresh = 0;
|
|
38324
|
-
let refused = 0;
|
|
38325
|
-
const candidates = [];
|
|
38326
|
-
const masked = [];
|
|
38327
|
-
for (const [logicalId, resource] of Object.entries(stateResources)) {
|
|
38328
|
-
if (!hasAddressablePhysicalId(resource)) continue;
|
|
38329
|
-
if (resource.observedProperties !== void 0) {
|
|
38330
|
-
if (isMaskedBaselineRecaptureCandidate(resource)) masked.push({
|
|
38331
|
-
logicalId,
|
|
38332
|
-
resource
|
|
38333
|
-
});
|
|
38334
|
-
continue;
|
|
38335
|
-
}
|
|
38336
|
-
if (resource.observedBaselineRefused === true) {
|
|
38337
|
-
refused++;
|
|
38338
|
-
continue;
|
|
38339
|
-
}
|
|
38340
|
-
candidates.push({
|
|
38341
|
-
logicalId,
|
|
38342
|
-
resource
|
|
38343
|
-
});
|
|
38344
|
-
}
|
|
38345
|
-
if (refused > 0) this.logger.debug(safeMsg`observed-properties auto-refresh SKIPPED for ${refused} resource(s) whose baseline a 'cdkd import' run refused: their recorded properties cannot position the redaction, so capturing an AWS readback against them could persist a resolved secret in plaintext. A deploy that actually CHANGES one of them restores its baseline, unless the refusal is an unverifiable-parameter one (only a replacement or a proving re-import discharges that); a NO_CHANGE deploy never does.`);
|
|
38346
|
-
if (candidates.length === 0 && masked.length === 0) return;
|
|
38347
|
-
const allSiblings = {};
|
|
38348
|
-
for (const [lid, res] of Object.entries(stateResources)) allSiblings[lid] = {
|
|
38349
|
-
resourceType: res.resourceType,
|
|
38350
|
-
properties: res.properties ?? {}
|
|
38351
|
-
};
|
|
38352
|
-
for (const { logicalId, resource } of candidates) {
|
|
38353
|
-
let provider;
|
|
38354
|
-
try {
|
|
38355
|
-
provider = this.providerRegistry.getProviderFor({
|
|
38356
|
-
resourceType: resource.resourceType,
|
|
38357
|
-
provisionedBy: resource.provisionedBy
|
|
38358
|
-
}).provider;
|
|
38359
|
-
} catch {
|
|
38360
|
-
continue;
|
|
38361
|
-
}
|
|
38362
|
-
if (!provider.readCurrentState) continue;
|
|
38363
|
-
const siblings = { ...allSiblings };
|
|
38364
|
-
delete siblings[logicalId];
|
|
38365
|
-
const recordProperties = resource.properties ?? {};
|
|
38366
|
-
const maskCoordinates = [...maskedLeafCoordinatesOf(recordProperties), ...noEchoLeavesOf(resource) ?? []];
|
|
38367
|
-
this.kickOffObservedCapture(provider, logicalId, resource.physicalId, resource.resourceType, recordProperties, { siblings }, void 0, maskCoordinates.length > 0 ? {
|
|
38368
|
-
properties: recordProperties,
|
|
38369
|
-
coordinates: maskCoordinates
|
|
38370
|
-
} : void 0);
|
|
38371
|
-
toRefresh++;
|
|
38372
|
-
}
|
|
38373
|
-
if (toRefresh > 0) this.logger.warn(safeMsg`cdkd state schema upgrade detected — refreshing observed-properties baseline for ${toRefresh} resource(s) (one-time, runs in parallel with deploy)`);
|
|
38374
|
-
let producerRegions = [];
|
|
38375
|
-
if (masked.length > 0) try {
|
|
38376
|
-
producerRegions = producerRegionsFromState(crossStackReads);
|
|
38377
|
-
} catch {
|
|
38378
|
-
this.logger.debug(safeMsg`Masked observed baseline re-capture skipped for ${masked.length} resource(s): the record's cross-stack reads could not be read.`);
|
|
38379
|
-
masked.length = 0;
|
|
38380
|
-
}
|
|
38381
|
-
for (const { logicalId, resource } of masked) {
|
|
38382
|
-
let provider;
|
|
38383
|
-
try {
|
|
38384
|
-
provider = this.providerRegistry.getProviderFor({
|
|
38385
|
-
resourceType: resource.resourceType,
|
|
38386
|
-
provisionedBy: resource.provisionedBy
|
|
38387
|
-
}).provider;
|
|
38388
|
-
} catch {
|
|
38389
|
-
continue;
|
|
38390
|
-
}
|
|
38391
|
-
if (!provider.readCurrentState) continue;
|
|
38392
|
-
const siblings = { ...allSiblings };
|
|
38393
|
-
delete siblings[logicalId];
|
|
38394
|
-
this.kickOffMaskedBaselineRecapture(provider, logicalId, resource, producerRegions, { siblings });
|
|
38395
|
-
}
|
|
38396
|
-
}
|
|
38397
|
-
function kickOffMaskedBaselineRecapture(provider, logicalId, resource, producerRegions, context) {
|
|
38398
|
-
const previous = resource.observedProperties;
|
|
38399
|
-
const readCurrentState = provider.readCurrentState?.bind(provider);
|
|
38400
|
-
if (previous === void 0 || readCurrentState === void 0) return;
|
|
38401
|
-
const properties = resource.properties ?? {};
|
|
38402
|
-
const task = (async () => {
|
|
38403
|
-
const secrets = await resolveRecordSecrets(properties, (token, own) => this.resolver.resolveDynamicReferences(token, persistedTokenResolverContext(own, producerRegions)));
|
|
38404
|
-
if (secrets === void 0 || secrets.size === 0) {
|
|
38405
|
-
this.logger.debug(safeMsg`Masked observed baseline of ${logicalId} kept: its recorded references did not all resolve to distinct values.`);
|
|
38406
|
-
return;
|
|
38407
|
-
}
|
|
38408
|
-
const readback = await withCurrentResourceSecrets(secrets, () => readCurrentState(resource.physicalId, logicalId, resource.resourceType, properties, context));
|
|
38409
|
-
if (readback === void 0 || readback === RESOURCE_NOT_FOUND) return void 0;
|
|
38410
|
-
const recaptured = recaptureMaskedBaseline({
|
|
38411
|
-
previous,
|
|
38412
|
-
readback,
|
|
38413
|
-
properties,
|
|
38414
|
-
secrets
|
|
38415
|
-
});
|
|
38416
|
-
if (recaptured === void 0) {
|
|
38417
|
-
this.logger.debug(safeMsg`Masked observed baseline of ${logicalId} kept: no masked position could be certified, or the resource no longer reads back as its baseline records.`);
|
|
38418
|
-
return;
|
|
38419
|
-
}
|
|
38420
|
-
this.recapturedBaselines.set(recaptured, previous);
|
|
38421
|
-
this.logger.debug(safeMsg`Re-captured the masked observed baseline of ${logicalId}.`);
|
|
38422
|
-
return recaptured;
|
|
38423
|
-
})().catch(() => {
|
|
38424
|
-
this.logger.debug(safeMsg`Masked observed baseline of ${logicalId} kept: the re-capture failed.`);
|
|
38425
|
-
});
|
|
38426
|
-
this.observedCaptureTasks.set(logicalId, task);
|
|
38875
|
+
if (namesParameter?.failedClosed !== void 0) logger.debug(safeMsg`The template's parameter dependence could not be judged (${namesParameter.failedClosed}): every observed-baseline refusal recorded without a reason is treated as an unverifiable-parameter refusal (${stamped} stamped).`);
|
|
38876
|
+
if (stamped > 0) logger.debug(safeMsg`${stamped} resource(s) carry an observed-baseline refusal recorded without a reason by an older cdkd, and their template definition reads a template parameter: treated as an unverifiable-parameter refusal (kept until the resource is replaced or re-imported against a CloudFormation stack that proves the parameter).`);
|
|
38427
38877
|
}
|
|
38428
38878
|
|
|
38429
38879
|
//#endregion
|
|
@@ -38445,7 +38895,7 @@ function diffLogMasker(diffSecrets, template, parameterValues, resources) {
|
|
|
38445
38895
|
return (text) => {
|
|
38446
38896
|
if (!judged) {
|
|
38447
38897
|
judged = true;
|
|
38448
|
-
storedSecretNameNeedles(resources, this.
|
|
38898
|
+
storedSecretNameNeedles(resources, this.stateNamingSecrets(), stateNames);
|
|
38449
38899
|
}
|
|
38450
38900
|
return union(text);
|
|
38451
38901
|
};
|
|
@@ -38475,34 +38925,34 @@ function rememberRecoverableMaskedOutputs(stackName, resolved, redacted) {
|
|
|
38475
38925
|
}
|
|
38476
38926
|
}
|
|
38477
38927
|
function absorbOutputsPassSecrets() {
|
|
38478
|
-
for (const passSecrets of this.outputsPassSecretMaps) {
|
|
38479
|
-
for (const [value, expr] of passSecrets) this.outputSecrets.set(value, expr);
|
|
38480
|
-
mergeResolvedPairs(passSecrets, this.outputSecrets);
|
|
38481
|
-
for (const physicalId of physicalNameCopiesOf.get(passSecrets) ?? []) recordPhysicalNameCopy(this.outputSecrets, physicalId);
|
|
38928
|
+
for (const passSecrets of this.outputsRun.outputsPassSecretMaps) {
|
|
38929
|
+
for (const [value, expr] of passSecrets) this.outputsRun.outputSecrets.set(value, expr);
|
|
38930
|
+
mergeResolvedPairs(passSecrets, this.outputsRun.outputSecrets);
|
|
38931
|
+
for (const physicalId of physicalNameCopiesOf.get(passSecrets) ?? []) recordPhysicalNameCopy(this.outputsRun.outputSecrets, physicalId);
|
|
38482
38932
|
}
|
|
38483
38933
|
}
|
|
38484
38934
|
function redactOutputs(outputs) {
|
|
38485
38935
|
const redacted = redactOutputsBag.call(this, outputs);
|
|
38486
|
-
if (this.outputsResolvedThisRun.has(outputs)) this.outputsResolvedThisRun.add(redacted);
|
|
38936
|
+
if (this.outputsRun.outputsResolvedThisRun.has(outputs)) this.outputsRun.outputsResolvedThisRun.add(redacted);
|
|
38487
38937
|
return redacted;
|
|
38488
38938
|
}
|
|
38489
38939
|
function redactOutputsBag(outputs) {
|
|
38490
38940
|
this.absorbOutputsPassSecrets();
|
|
38491
|
-
if (this.outputSecrets.size === 0) return this.
|
|
38492
|
-
return this.
|
|
38941
|
+
if (this.outputsRun.outputSecrets.size === 0) return maskOutputsByPosition(this.noEchoRun, this.noEchoDeps(), outputs);
|
|
38942
|
+
return maskOutputsByPosition(this.noEchoRun, this.noEchoDeps(), redactSecretsForState(outputs, this.outputsRun.outputSecrets, this.outputsRun.outputsSourceUsable ? this.outputsRun.outputsTemplateSource : void 0, TEMPLATE_SOURCED_RULES));
|
|
38493
38943
|
}
|
|
38494
38944
|
function registerNoEchoAttributes(logicalId, result, secrets, ownProperties) {
|
|
38495
38945
|
const declared = recordNoEchoAttributeValues(result, secrets, ownProperties);
|
|
38496
38946
|
const echoed = echoedNoEchoAttributes(this, logicalId, result.attributes, secrets, ownProperties, result.physicalId);
|
|
38497
|
-
if (declared === true) this.noEchoAttributeResources.set(logicalId, true);
|
|
38498
|
-
else if (declared !== void 0 || echoed.size > 0) this.noEchoAttributeResources.set(logicalId, /* @__PURE__ */ new Set([...declared ?? [], ...echoed]));
|
|
38947
|
+
if (declared === true) this.noEchoRun.noEchoAttributeResources.set(logicalId, true);
|
|
38948
|
+
else if (declared !== void 0 || echoed.size > 0) this.noEchoRun.noEchoAttributeResources.set(logicalId, /* @__PURE__ */ new Set([...declared ?? [], ...echoed]));
|
|
38499
38949
|
}
|
|
38500
38950
|
function echoedNoEchoAttributes(engine, logicalId, attributes, secrets, ownProperties, physicalId) {
|
|
38501
38951
|
const echoed = /* @__PURE__ */ new Set();
|
|
38502
38952
|
if (attributes === void 0) return echoed;
|
|
38503
38953
|
const fresh = [...freshNoEchoValuesOf.get(secrets) ?? []].filter((value) => isMaskOnlyPlaintext(secrets, value));
|
|
38504
38954
|
const templateProps = engine.perResourceTemplateProps.get(logicalId);
|
|
38505
|
-
const sources = engine.
|
|
38955
|
+
const sources = noEchoPositionSources(engine.noEchoRun);
|
|
38506
38956
|
const positioned = /* @__PURE__ */ new Map();
|
|
38507
38957
|
if (templateProps !== void 0 && ownProperties !== void 0 && sources !== void 0) for (const coordinate of noEchoCoordinatesOf(templateProps, ownProperties, {
|
|
38508
38958
|
parameters: sources.parameters,
|
|
@@ -38541,7 +38991,7 @@ function refuseRedactedAttributeReads(logicalId, resourceType, context) {
|
|
|
38541
38991
|
function allRecordedSecrets() {
|
|
38542
38992
|
const all = /* @__PURE__ */ new Map();
|
|
38543
38993
|
for (const bag of this.perResourceSecrets.values()) for (const [plaintext, expression] of bag) all.set(plaintext, expression);
|
|
38544
|
-
for (const [plaintext, expression] of this.outputSecrets) all.set(plaintext, expression);
|
|
38994
|
+
for (const [plaintext, expression] of this.outputsRun.outputSecrets) all.set(plaintext, expression);
|
|
38545
38995
|
return all;
|
|
38546
38996
|
}
|
|
38547
38997
|
async function readReaderForFreshNoEchoCeiling(logicalId, currentResource, secrets) {
|
|
@@ -38597,8 +39047,39 @@ function noteSecretNamedRecord(logicalId, record) {
|
|
|
38597
39047
|
function namingSecretsFor(logicalId) {
|
|
38598
39048
|
const own = this.perResourceSecrets.get(logicalId);
|
|
38599
39049
|
const noEcho = this.fingerprintNoEchoValues;
|
|
38600
|
-
|
|
38601
|
-
|
|
39050
|
+
const stored = this.storedNoEchoNamingValues.get(logicalId);
|
|
39051
|
+
if (!hasMaskableValues(noEcho) && !hasMaskableValues(stored)) return own;
|
|
39052
|
+
return unionOfSecretBags([
|
|
39053
|
+
own,
|
|
39054
|
+
noEcho,
|
|
39055
|
+
stored
|
|
39056
|
+
]);
|
|
39057
|
+
}
|
|
39058
|
+
function stateNamingSecrets() {
|
|
39059
|
+
const base = this.fingerprintNoEchoValues;
|
|
39060
|
+
const stored = this.storedNoEchoNamingValues;
|
|
39061
|
+
if (stored.size === 0) return base;
|
|
39062
|
+
const hit = namingSecretsMemo.get(stored);
|
|
39063
|
+
if (hit !== void 0 && hit.base === base) return hit.secrets;
|
|
39064
|
+
const secrets = namingSecretsWithRecordedNoEcho(base, (logicalId) => stored.get(logicalId));
|
|
39065
|
+
namingSecretsMemo.set(stored, {
|
|
39066
|
+
base,
|
|
39067
|
+
secrets
|
|
39068
|
+
});
|
|
39069
|
+
return secrets;
|
|
39070
|
+
}
|
|
39071
|
+
const namingSecretsMemo = /* @__PURE__ */ new WeakMap();
|
|
39072
|
+
function captureStoredNoEchoNamingValues(resources, template, conditions) {
|
|
39073
|
+
const names = new Set(this.noEchoRun.inheritedNoEchoParameters);
|
|
39074
|
+
for (const [name, definition] of Object.entries(template.Parameters ?? {})) if (declaresNoEcho(definition)) names.add(name);
|
|
39075
|
+
const templateResources = template.Resources ?? {};
|
|
39076
|
+
const captured = /* @__PURE__ */ new Map();
|
|
39077
|
+
for (const [logicalId, record] of Object.entries(resources)) {
|
|
39078
|
+
const templateResource = Object.hasOwn(templateResources, logicalId) ? templateResources[logicalId] : void 0;
|
|
39079
|
+
const bag = recordedNoEchoValuesOf(templateResource?.Type === record?.resourceType ? templateResource?.Properties : void 0, record, names, conditions);
|
|
39080
|
+
if (hasMaskableValues(bag)) captured.set(logicalId, bag);
|
|
39081
|
+
}
|
|
39082
|
+
this.storedNoEchoNamingValues = captured;
|
|
38602
39083
|
}
|
|
38603
39084
|
function noteSecretNamedReads(logicalId, record, resources) {
|
|
38604
39085
|
const read = secretNamesReadBy(logicalId, record, resources, (otherId) => ({
|
|
@@ -38954,68 +39435,6 @@ function warnUnretriedReplacedDeletes(why) {
|
|
|
38954
39435
|
for (const [logicalId, entry] of deferred ?? []) withPrintingSecrets(this.secretNameBagFor(logicalId), () => this.logger.warn(safeMsg` ⚠ Failed to delete old resource ${logicalId} (${entry.physicalId}): ${entry.failureMessage} (${note})`));
|
|
38955
39436
|
}
|
|
38956
39437
|
|
|
38957
|
-
//#endregion
|
|
38958
|
-
//#region src/deployment/read-only-attribute-healer.ts
|
|
38959
|
-
async function readRecordAttributes(input) {
|
|
38960
|
-
const { provider, logicalId, resource, stackName, region } = input;
|
|
38961
|
-
if (!provider.import) return { kind: "not-attempted" };
|
|
38962
|
-
if (!hasAddressablePhysicalId(resource)) return { kind: "not-attempted" };
|
|
38963
|
-
const found = await provider.import({
|
|
38964
|
-
logicalId,
|
|
38965
|
-
resourceType: resource.resourceType,
|
|
38966
|
-
stackName,
|
|
38967
|
-
region,
|
|
38968
|
-
properties: resource.properties,
|
|
38969
|
-
knownPhysicalId: resource.physicalId
|
|
38970
|
-
});
|
|
38971
|
-
if (found === null) return { kind: "not-found" };
|
|
38972
|
-
if (found.physicalId !== resource.physicalId) throw new Error(`the provider answered for a different resource (${found.physicalId}) than the one asked about (${resource.physicalId})`);
|
|
38973
|
-
const reported = Object.entries(normalizeHealedAttributes(found.attributes));
|
|
38974
|
-
const attributes = Object.fromEntries(reported.filter(([, value]) => !carriesSecretMask(value)));
|
|
38975
|
-
const withheldKeys = reported.filter(([, value]) => carriesSecretMask(value)).map(([key]) => key);
|
|
38976
|
-
return {
|
|
38977
|
-
kind: "read",
|
|
38978
|
-
attributes,
|
|
38979
|
-
...withheldKeys.length > 0 && { withheldKeys }
|
|
38980
|
-
};
|
|
38981
|
-
}
|
|
38982
|
-
function createReadOnlyAttributeHealerFactory(options) {
|
|
38983
|
-
const logger = getLogger().child("ReadOnlyAttributeHealer");
|
|
38984
|
-
const memo = /* @__PURE__ */ new Map();
|
|
38985
|
-
const readOnce = (stackName, region, logicalId, resource) => {
|
|
38986
|
-
let key;
|
|
38987
|
-
try {
|
|
38988
|
-
if (isHealExcludedType(resource.resourceType)) return Promise.resolve({ kind: "not-attempted" });
|
|
38989
|
-
key = injectiveKey(stackName, region, logicalId, resource.physicalId);
|
|
38990
|
-
} catch (error) {
|
|
38991
|
-
return Promise.resolve({
|
|
38992
|
-
kind: "failed",
|
|
38993
|
-
error
|
|
38994
|
-
});
|
|
38995
|
-
}
|
|
38996
|
-
const inFlight = memo.get(key);
|
|
38997
|
-
if (inFlight) return inFlight;
|
|
38998
|
-
const heal = (async () => options.inRegion(region, () => readRecordAttributes({
|
|
38999
|
-
provider: options.getProvider(resource, region),
|
|
39000
|
-
logicalId,
|
|
39001
|
-
resource,
|
|
39002
|
-
stackName,
|
|
39003
|
-
region
|
|
39004
|
-
})))().then((outcome) => {
|
|
39005
|
-
if (outcome.kind === "read") try {
|
|
39006
|
-
logger.debug(safeMsg`Re-read the attributes of ${displaySafe(logicalId)} (${displaySafe(resource.resourceType)}) from AWS for this preview — its state record lacked one a Fn::GetAtt asked for; nothing is written: ${Object.keys(outcome.attributes).length} attribute(s) read`);
|
|
39007
|
-
} catch {}
|
|
39008
|
-
return outcome;
|
|
39009
|
-
}).catch((error) => ({
|
|
39010
|
-
kind: "failed",
|
|
39011
|
-
error
|
|
39012
|
-
}));
|
|
39013
|
-
memo.set(key, heal);
|
|
39014
|
-
return heal;
|
|
39015
|
-
};
|
|
39016
|
-
return (stackName, region) => Object.assign((logicalId, resource) => readOnce(stackName, region, logicalId, resource), { readOnly: true });
|
|
39017
|
-
}
|
|
39018
|
-
|
|
39019
39438
|
//#endregion
|
|
39020
39439
|
//#region src/deployment/deploy-engine/attribute-healer.ts
|
|
39021
39440
|
var AttributeHealer = class {
|
|
@@ -39052,7 +39471,7 @@ var AttributeHealer = class {
|
|
|
39052
39471
|
provisionedBy: resource.provisionedBy,
|
|
39053
39472
|
previousProperties: resource.properties
|
|
39054
39473
|
});
|
|
39055
|
-
const outcome = await withPrintingSecrets(healPrintingBag(this.deps.baseline, logicalId, resource), () => readRecordAttributes({
|
|
39474
|
+
const outcome = await withPrintingSecrets(healPrintingBag(this.deps.baseline, logicalId, resource, this.deps.namingSecrets()), () => readRecordAttributes({
|
|
39056
39475
|
provider,
|
|
39057
39476
|
logicalId,
|
|
39058
39477
|
resource,
|
|
@@ -39087,23 +39506,26 @@ var AttributeHealer = class {
|
|
|
39087
39506
|
}
|
|
39088
39507
|
};
|
|
39089
39508
|
const healJudges = /* @__PURE__ */ new WeakMap();
|
|
39090
|
-
function healPrintingBag(baseline, logicalId, resource) {
|
|
39091
|
-
if (!Object.hasOwn(baseline, logicalId) || baseline[logicalId] !== resource) return
|
|
39509
|
+
function healPrintingBag(baseline, logicalId, resource, namingSecrets) {
|
|
39510
|
+
if (!Object.hasOwn(baseline, logicalId) || baseline[logicalId] !== resource) return secretNamePrintingBags({
|
|
39092
39511
|
...baseline,
|
|
39093
39512
|
[logicalId]: resource
|
|
39094
|
-
});
|
|
39095
|
-
let
|
|
39096
|
-
if (
|
|
39097
|
-
|
|
39098
|
-
|
|
39513
|
+
}, namingSecrets)(logicalId);
|
|
39514
|
+
let hit = healJudges.get(baseline);
|
|
39515
|
+
if (hit === void 0 || hit.namingSecrets !== namingSecrets) {
|
|
39516
|
+
hit = {
|
|
39517
|
+
namingSecrets,
|
|
39518
|
+
judge: secretNamePrintingBags(baseline, namingSecrets)
|
|
39519
|
+
};
|
|
39520
|
+
healJudges.set(baseline, hit);
|
|
39099
39521
|
}
|
|
39100
|
-
return judge(logicalId);
|
|
39522
|
+
return hit.judge(logicalId);
|
|
39101
39523
|
}
|
|
39102
39524
|
|
|
39103
39525
|
//#endregion
|
|
39104
39526
|
//#region src/deployment/deploy-engine/record-shape.ts
|
|
39105
|
-
function auditResolvedAssetReferences(logicalId, resourceType, resolvedProps) {
|
|
39106
|
-
const redirect =
|
|
39527
|
+
function auditResolvedAssetReferences(options, logicalId, resourceType, resolvedProps) {
|
|
39528
|
+
const redirect = options.assetRedirect;
|
|
39107
39529
|
if (!redirect) return;
|
|
39108
39530
|
const findings = findUnrewrittenAssetReferences(resolvedProps, redirect);
|
|
39109
39531
|
if (findings.length === 0) return;
|
|
@@ -39138,6 +39560,57 @@ function acceptedCreateOnlyDropsField(recordedProperties, resourceType, provisio
|
|
|
39138
39560
|
const names = findSilentDropProperties(resourceType, recordedProperties).map(({ property }) => property).filter((property) => createOnly.has(property) && (carried === void 0 || carried.has(property)));
|
|
39139
39561
|
return { acceptedCreateOnlyDrops: names.length > 0 ? names : void 0 };
|
|
39140
39562
|
}
|
|
39563
|
+
function secretNamedAttributesField(result, previous) {
|
|
39564
|
+
const reported = result.secretNamedAttributeNames;
|
|
39565
|
+
const source = reported !== void 0 ? reported : previous?.secretNamedAttributes;
|
|
39566
|
+
if (!Array.isArray(source)) return {};
|
|
39567
|
+
const names = source.filter((name) => typeof name === "string" && name !== "");
|
|
39568
|
+
return names.length > 0 ? { secretNamedAttributes: names } : {};
|
|
39569
|
+
}
|
|
39570
|
+
|
|
39571
|
+
//#endregion
|
|
39572
|
+
//#region src/deployment/label-routing.ts
|
|
39573
|
+
function deriveLabelRouting(change, existingState, registry, forceCcApi = false) {
|
|
39574
|
+
try {
|
|
39575
|
+
if (change.changeType === "DELETE") return existingState?.provisionedBy;
|
|
39576
|
+
return registry.getProviderFor({
|
|
39577
|
+
resourceType: change.resourceType,
|
|
39578
|
+
properties: change.desiredProperties ?? {},
|
|
39579
|
+
provisionedBy: existingState?.provisionedBy,
|
|
39580
|
+
previousProperties: existingState?.properties,
|
|
39581
|
+
forceCcApi
|
|
39582
|
+
}).provisionedBy;
|
|
39583
|
+
} catch {
|
|
39584
|
+
return;
|
|
39585
|
+
}
|
|
39586
|
+
}
|
|
39587
|
+
|
|
39588
|
+
//#endregion
|
|
39589
|
+
//#region src/deployment/deploy-engine/routing.ts
|
|
39590
|
+
function isPinnedToCcApi(options, stackName, logicalId) {
|
|
39591
|
+
return options.pinCcApi?.stackName === stackName && options.pinCcApi.logicalIds.has(logicalId);
|
|
39592
|
+
}
|
|
39593
|
+
function recreateDirectionFor(options, stackName, logicalId) {
|
|
39594
|
+
const targets = options.recreateTargets?.stackName === stackName ? options.recreateTargets : void 0;
|
|
39595
|
+
if (targets === void 0) return void 0;
|
|
39596
|
+
if (targets.viaCcApi.has(logicalId)) return "cc-api";
|
|
39597
|
+
if (targets.viaSdkProvider.has(logicalId)) return "sdk";
|
|
39598
|
+
}
|
|
39599
|
+
function peekRoutingForLabel(providerRegistry, options, change, existingState, stackName, logicalId, needsReplacement = false, recreateDirection) {
|
|
39600
|
+
if (needsReplacement) {
|
|
39601
|
+
const hintRecord = {
|
|
39602
|
+
...recreateDirection !== void 0 && { provisionedBy: recreateDirection },
|
|
39603
|
+
...existingState?.properties !== void 0 && { properties: existingState.properties }
|
|
39604
|
+
};
|
|
39605
|
+
return deriveLabelRouting(change, hintRecord, providerRegistry, recreateDirection === "cc-api");
|
|
39606
|
+
}
|
|
39607
|
+
return deriveLabelRouting(change, existingState, providerRegistry, isPinnedToCcApi(options, stackName, logicalId));
|
|
39608
|
+
}
|
|
39609
|
+
function preparePropertiesForCcApi(providerRegistry, resourceType, resolvedProps, logicalId) {
|
|
39610
|
+
const sdkProvider = providerRegistry.getRegisteredTypes().includes(resourceType) ? providerRegistry.getProvider(resourceType) : void 0;
|
|
39611
|
+
if (sdkProvider?.preparePropertiesForFallback) return sdkProvider.preparePropertiesForFallback(logicalId, resourceType, resolvedProps);
|
|
39612
|
+
return applyDefaultNameForFallback(logicalId, resourceType, resolvedProps);
|
|
39613
|
+
}
|
|
39141
39614
|
|
|
39142
39615
|
//#endregion
|
|
39143
39616
|
//#region src/utils/resource-line.ts
|
|
@@ -39243,7 +39716,7 @@ function buildResolverContext(base, stackName) {
|
|
|
39243
39716
|
...this.options.inheritedPhysicalNameCopies && { inheritedPhysicalNameCopies: this.options.inheritedPhysicalNameCopies },
|
|
39244
39717
|
...this.options.inheritedReferenceProvenance && { inheritedReferenceProvenance: this.options.inheritedReferenceProvenance },
|
|
39245
39718
|
recordedSecretValues,
|
|
39246
|
-
noEchoAttributeResources: this.noEchoAttributeResources,
|
|
39719
|
+
noEchoAttributeResources: this.noEchoRun.noEchoAttributeResources,
|
|
39247
39720
|
secretNameNeedles: (logicalId) => this.noteSecretNamedRecord(logicalId, Object.hasOwn(base.resources, logicalId) ? base.resources[logicalId] : void 0),
|
|
39248
39721
|
producerSecrets: (logicalId) => this.perResourceSecrets.get(logicalId),
|
|
39249
39722
|
secretRegionEvidence: () => this.runProducerRegionEvidence?.(),
|
|
@@ -39318,7 +39791,7 @@ async function provisionCreate(logicalId, change, stateResources, stackName, tem
|
|
|
39318
39791
|
redactedAttributeReads: []
|
|
39319
39792
|
}, stackName);
|
|
39320
39793
|
if (context.recordedSecretValues) this.perResourceSecrets.set(logicalId, context.recordedSecretValues);
|
|
39321
|
-
const noEchoOverrides = await this.
|
|
39794
|
+
const noEchoOverrides = await noEchoAttributeOverridesFor(this.noEchoRun, this.noEchoDeps(), desiredProps, stateResources, stackName);
|
|
39322
39795
|
if (noEchoOverrides !== void 0) context.noEchoAttributeOverrides = noEchoOverrides;
|
|
39323
39796
|
printNestedStackReadsOnly(context, resourceType, this.secretNameBagFor(logicalId));
|
|
39324
39797
|
const resolvedProps = await this.resolver.resolve(desiredProps, context);
|
|
@@ -39336,17 +39809,17 @@ async function provisionCreate(logicalId, change, stateResources, stackName, tem
|
|
|
39336
39809
|
]), inputFingerprinter(desiredProps, fingerprintSources)));
|
|
39337
39810
|
this.perResourceResolvedType.set(logicalId, resourceType);
|
|
39338
39811
|
const createSecrets = context.recordedSecretValues ?? /* @__PURE__ */ new Map();
|
|
39339
|
-
if (resourceType === "AWS::CloudFormation::Stack") recordPassedNoEchoParameters(createSecrets, desiredProps["Parameters"], this.
|
|
39812
|
+
if (resourceType === "AWS::CloudFormation::Stack") recordPassedNoEchoParameters(createSecrets, desiredProps["Parameters"], noEchoPositionSources(this.noEchoRun, stateResources));
|
|
39340
39813
|
if (fingerprintSources !== void 0 && resourceType === "AWS::CloudFormation::Stack") recordPassedParameterClasses(createSecrets, await classifyPassedParameters(desiredProps["Parameters"], fingerprintSources));
|
|
39341
39814
|
recordNestedStackParameterExpressions(createSecrets, resourceType, resolvedProps, desiredProps);
|
|
39342
|
-
this.
|
|
39815
|
+
auditResolvedAssetReferences(this.options, logicalId, resourceType, resolvedProps);
|
|
39343
39816
|
this.attemptedResolvedProps.set(logicalId, resolvedProps);
|
|
39344
39817
|
const createDecision = this.providerRegistry.getProviderFor({
|
|
39345
39818
|
resourceType,
|
|
39346
39819
|
properties: resolvedProps
|
|
39347
39820
|
});
|
|
39348
39821
|
const createProvider = createDecision.provider;
|
|
39349
|
-
const createProps = createDecision.provisionedBy === "cc-api" ? this.
|
|
39822
|
+
const createProps = createDecision.provisionedBy === "cc-api" ? preparePropertiesForCcApi(this.providerRegistry, resourceType, resolvedProps, logicalId) : resolvedProps;
|
|
39350
39823
|
const resumed = await resumeAbandonedCreate.call(this, {
|
|
39351
39824
|
logicalId,
|
|
39352
39825
|
resourceType,
|
|
@@ -39389,23 +39862,28 @@ async function provisionCreate(logicalId, change, stateResources, stackName, tem
|
|
|
39389
39862
|
}
|
|
39390
39863
|
this.generatedNameGuard?.noteReturned(logicalId);
|
|
39391
39864
|
this.registerNoEchoAttributes(logicalId, result, createSecrets, resolvedProps);
|
|
39392
|
-
const dependencies =
|
|
39393
|
-
const templateAttrs =
|
|
39394
|
-
const recordedProperties =
|
|
39865
|
+
const dependencies = extractAllDependencies(template, logicalId);
|
|
39866
|
+
const templateAttrs = extractTemplateAttributes(template, logicalId);
|
|
39867
|
+
const recordedProperties = propertiesToRecord(resolvedProps, result, resourceType, createDecision.provisionedBy);
|
|
39395
39868
|
stateResources[logicalId] = {
|
|
39396
39869
|
physicalId: result.physicalId,
|
|
39397
39870
|
resourceType,
|
|
39398
39871
|
properties: recordedProperties,
|
|
39399
39872
|
...acceptedCreateOnlyDropsField(recordedProperties, resourceType, createDecision.provisionedBy, "new-resource"),
|
|
39400
39873
|
...result.attributes && { attributes: result.attributes },
|
|
39874
|
+
...secretNamedAttributesField(result),
|
|
39401
39875
|
...dependencies && dependencies.length > 0 && { dependencies },
|
|
39402
39876
|
...templateAttrs,
|
|
39403
39877
|
provisionedBy: createDecision.provisionedBy
|
|
39404
39878
|
};
|
|
39405
39879
|
this.recordInlinePolicyWrite(logicalId, "create");
|
|
39406
|
-
await this.
|
|
39407
|
-
const createCaptureSiblings = await
|
|
39408
|
-
|
|
39880
|
+
await establishNoEchoEchoFidelity(this.noEchoRun, this.noEchoDeps(), logicalId, stateResources[logicalId], resolvedProps, stateResources, createSecrets);
|
|
39881
|
+
const createCaptureSiblings = await buildObservedCaptureSiblings({
|
|
39882
|
+
options: this.options,
|
|
39883
|
+
buildResolverContext: (...args) => this.buildResolverContext(...args),
|
|
39884
|
+
resolver: this.resolver
|
|
39885
|
+
}, resourceType, logicalId, result.physicalId, template, stateResources, stackName, parameterValues, conditions);
|
|
39886
|
+
this.observedCapture.kickOffObservedCapture(createProvider, logicalId, result.physicalId, resourceType, resolvedProps, {
|
|
39409
39887
|
...createCaptureSiblings,
|
|
39410
39888
|
afterOwnWrite: true
|
|
39411
39889
|
}, createSecrets);
|
|
@@ -42438,333 +42916,6 @@ function withRefreshedReadVersions(record, unchanged) {
|
|
|
42438
42916
|
return withReferenceProvenance(record, out);
|
|
42439
42917
|
}
|
|
42440
42918
|
|
|
42441
|
-
//#endregion
|
|
42442
|
-
//#region src/deployment/deploy-engine/noecho.ts
|
|
42443
|
-
function noEchoExactEchoLeavesOf(record) {
|
|
42444
|
-
const field = record?.noEchoExactEchoLeaves;
|
|
42445
|
-
if (!Array.isArray(field)) return void 0;
|
|
42446
|
-
const out = [];
|
|
42447
|
-
for (const entry of field) {
|
|
42448
|
-
if (!Array.isArray(entry) || entry.length === 0) return void 0;
|
|
42449
|
-
if (!entry.every((segment) => typeof segment === "string")) return void 0;
|
|
42450
|
-
out.push([...entry]);
|
|
42451
|
-
}
|
|
42452
|
-
return out;
|
|
42453
|
-
}
|
|
42454
|
-
function echoFidelityCandidates(coordinates, resolved, createOnly) {
|
|
42455
|
-
const out = [];
|
|
42456
|
-
for (const coordinate of coordinates) {
|
|
42457
|
-
if (!coordinate.every((segment) => typeof segment === "string")) continue;
|
|
42458
|
-
const keys = coordinate;
|
|
42459
|
-
if (!createOnly.some((path) => path.length <= keys.length && path.every((s, i) => s === keys[i]))) continue;
|
|
42460
|
-
const plaintext = valueAtCoordinate(resolved, keys);
|
|
42461
|
-
if (typeof plaintext !== "string" || carriesSecretMask(plaintext)) continue;
|
|
42462
|
-
out.push({
|
|
42463
|
-
coordinate: keys,
|
|
42464
|
-
plaintext
|
|
42465
|
-
});
|
|
42466
|
-
}
|
|
42467
|
-
return out;
|
|
42468
|
-
}
|
|
42469
|
-
function reportedLeafAt(live, handed, candidate) {
|
|
42470
|
-
if (valueAtCoordinate(handed, candidate.coordinate) !== "***") return void 0;
|
|
42471
|
-
const leaf = valueAtCoordinate(live, candidate.coordinate);
|
|
42472
|
-
return typeof leaf === "string" && !carriesSecretMask(leaf) ? leaf : void 0;
|
|
42473
|
-
}
|
|
42474
|
-
function echoesExactlyAt(live, handed, candidate) {
|
|
42475
|
-
return reportedLeafAt(live, handed, candidate) === candidate.plaintext;
|
|
42476
|
-
}
|
|
42477
|
-
function provesEchoChangeAt(live, handed, candidate) {
|
|
42478
|
-
const reported = reportedLeafAt(live, handed, candidate);
|
|
42479
|
-
return reported !== void 0 && reported !== candidate.plaintext;
|
|
42480
|
-
}
|
|
42481
|
-
function noteNoEchoExactEchoes(logicalId, physicalId, read, handed, candidates, mode) {
|
|
42482
|
-
const exact = "failure" in read ? [] : candidates.filter((candidate) => echoesExactlyAt(read.live, handed, candidate)).map((candidate) => [...candidate.coordinate]);
|
|
42483
|
-
const noted = this.noEchoExactEchoes.get(logicalId);
|
|
42484
|
-
const previous = mode === "add" && noted?.physicalId === physicalId ? noted.coordinates : [];
|
|
42485
|
-
this.noEchoExactEchoes.set(logicalId, {
|
|
42486
|
-
physicalId,
|
|
42487
|
-
coordinates: sortedCoordinates([...previous, ...exact])
|
|
42488
|
-
});
|
|
42489
|
-
}
|
|
42490
|
-
function sortedCoordinates(coordinates) {
|
|
42491
|
-
const keyed = /* @__PURE__ */ new Map();
|
|
42492
|
-
for (const coordinate of coordinates) keyed.set(JSON.stringify(coordinate), [...coordinate]);
|
|
42493
|
-
return [...keyed.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([, c]) => c);
|
|
42494
|
-
}
|
|
42495
|
-
async function establishNoEchoEchoFidelity(logicalId, record, resolvedProps, stateResources, secrets) {
|
|
42496
|
-
this.noEchoExactEchoes.delete(logicalId);
|
|
42497
|
-
const templateProps = this.perResourceTemplateProps.get(logicalId);
|
|
42498
|
-
const sources = this.noEchoPositionSources(stateResources);
|
|
42499
|
-
if (templateProps === void 0 || sources === void 0 || sources.parameters.size === 0) return;
|
|
42500
|
-
const coordinates = canonicalCoordinates(noEchoCoordinatesOf(templateProps, resolvedProps, {
|
|
42501
|
-
parameters: sources.parameters,
|
|
42502
|
-
...sources.conditions !== void 0 && { conditions: sources.conditions }
|
|
42503
|
-
}));
|
|
42504
|
-
if (coordinates.length === 0) return;
|
|
42505
|
-
const candidates = echoFidelityCandidates(coordinates, resolvedProps, await getCreateOnlyPropertyPaths(record.resourceType).catch(() => []));
|
|
42506
|
-
if (candidates.length === 0) return;
|
|
42507
|
-
const handed = {
|
|
42508
|
-
...record,
|
|
42509
|
-
properties: maskAtCoordinates(record.properties, coordinates)
|
|
42510
|
-
};
|
|
42511
|
-
const read = await this.readReaderForFreshNoEchoCeiling(logicalId, handed, secrets);
|
|
42512
|
-
this.noteNoEchoExactEchoes(logicalId, record.physicalId, read, handed.properties, candidates, "set");
|
|
42513
|
-
}
|
|
42514
|
-
function withNoEchoExactEchoes(logicalId, record) {
|
|
42515
|
-
const noted = this.noEchoExactEchoes.get(logicalId);
|
|
42516
|
-
if (noted === void 0 || noted.coordinates.length === 0) return record;
|
|
42517
|
-
if (noted.physicalId !== record.physicalId) return record;
|
|
42518
|
-
const merged = sortedCoordinates([...noEchoExactEchoLeavesOf(record) ?? [], ...noted.coordinates]);
|
|
42519
|
-
return {
|
|
42520
|
-
...record,
|
|
42521
|
-
noEchoExactEchoLeaves: merged
|
|
42522
|
-
};
|
|
42523
|
-
}
|
|
42524
|
-
function noEchoParameterNamesOf(template) {
|
|
42525
|
-
const names = /* @__PURE__ */ new Set();
|
|
42526
|
-
const declared = template?.Parameters;
|
|
42527
|
-
if (declared === null || typeof declared !== "object") return names;
|
|
42528
|
-
for (const [name, definition] of Object.entries(declared)) if (declaresNoEcho(definition)) names.add(name);
|
|
42529
|
-
return names;
|
|
42530
|
-
}
|
|
42531
|
-
function noEchoAttributeNamesOf(record) {
|
|
42532
|
-
const field = record?.noEchoAttributeNames;
|
|
42533
|
-
if (!Array.isArray(field) || !field.every((name) => typeof name === "string")) return void 0;
|
|
42534
|
-
return field;
|
|
42535
|
-
}
|
|
42536
|
-
function noEchoPositionSources(resources = {}, template = this.constructPathTemplate, conditions = this.noEchoConditions) {
|
|
42537
|
-
if (template === void 0) return void 0;
|
|
42538
|
-
const declared = this.noEchoAttributeResources;
|
|
42539
|
-
return {
|
|
42540
|
-
parameters: /* @__PURE__ */ new Set([...noEchoParameterNamesOf(template), ...this.inheritedNoEchoParameters]),
|
|
42541
|
-
attributeIsNoEcho: (logicalId, attribute) => {
|
|
42542
|
-
const live = declared.get(logicalId);
|
|
42543
|
-
if (live === true || live !== void 0 && live.has(attribute)) return true;
|
|
42544
|
-
if (noEchoAttributeNamesOf(Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0)?.includes(attribute) === true) return true;
|
|
42545
|
-
return this.persistedNoEchoAttributes.get(logicalId)?.has(attribute) === true;
|
|
42546
|
-
},
|
|
42547
|
-
...conditions !== void 0 && { conditions }
|
|
42548
|
-
};
|
|
42549
|
-
}
|
|
42550
|
-
function noEchoLeavesFor(logicalId, record, templateProps, sources) {
|
|
42551
|
-
if (templateProps !== void 0 && isWrittenFromDeployedTemplate(record.properties)) return canonicalCoordinates(noEchoCoordinatesOf(templateProps, record.properties, sources));
|
|
42552
|
-
const existing = noEchoLeavesOf(record);
|
|
42553
|
-
if (existing !== void 0) {
|
|
42554
|
-
const confirmed = this.witnessConfirmedLeaves.get(logicalId) ?? [];
|
|
42555
|
-
return canonicalCoordinates([...existing, ...confirmed]);
|
|
42556
|
-
}
|
|
42557
|
-
const resolvedAsSame = this.perResourceResolvedType.get(logicalId) === record.resourceType;
|
|
42558
|
-
const source = (templateProps !== void 0 && resolvedAsSame ? templateProps : void 0) ?? templatePropertiesFor(this, logicalId, record.resourceType);
|
|
42559
|
-
if (source === void 0) return void 0;
|
|
42560
|
-
return canonicalCoordinates(noEchoCoordinatesOf(source, record.properties, sources));
|
|
42561
|
-
}
|
|
42562
|
-
function templatePropertiesFor(engine, logicalId, resourceType) {
|
|
42563
|
-
const resources = engine.constructPathTemplate?.Resources;
|
|
42564
|
-
if (resources === void 0 || !Object.hasOwn(resources, logicalId)) return void 0;
|
|
42565
|
-
const definition = resources[logicalId];
|
|
42566
|
-
if (definition?.Type !== resourceType) return void 0;
|
|
42567
|
-
const properties = definition.Properties;
|
|
42568
|
-
return properties !== null && typeof properties === "object" && !Array.isArray(properties) ? properties : void 0;
|
|
42569
|
-
}
|
|
42570
|
-
function noEchoAttributeNamesFor(engine, logicalId, record, carried, leaves) {
|
|
42571
|
-
const attributes = record.attributes ?? {};
|
|
42572
|
-
const names = /* @__PURE__ */ new Set();
|
|
42573
|
-
let echoed = false;
|
|
42574
|
-
for (const coordinate of leaves ?? []) {
|
|
42575
|
-
const value = valueAtCoordinate(record.properties, coordinate);
|
|
42576
|
-
if (value === void 0 || carriesSecretMask(value)) continue;
|
|
42577
|
-
for (const [name, attribute] of Object.entries(attributes)) {
|
|
42578
|
-
if (carriesSecretMask(attribute)) continue;
|
|
42579
|
-
if (typeof attribute === "string" && attribute === record.physicalId) continue;
|
|
42580
|
-
const sameName = coordinate[0] === name && keyOrderFreeJson(attribute) === keyOrderFreeJson(value);
|
|
42581
|
-
const embeds = typeof value === "string" && typeof attribute === "string" && !attribute.startsWith("arn:") && value.length >= 4 && typeof attribute === "string" && attribute.includes(value);
|
|
42582
|
-
if (sameName || embeds) {
|
|
42583
|
-
names.add(name);
|
|
42584
|
-
echoed = true;
|
|
42585
|
-
}
|
|
42586
|
-
}
|
|
42587
|
-
}
|
|
42588
|
-
const declared = carried ? void 0 : engine.noEchoAttributeResources.get(logicalId);
|
|
42589
|
-
if (declared === true) for (const name of Object.keys(attributes)) names.add(name);
|
|
42590
|
-
else if (declared !== void 0) {
|
|
42591
|
-
for (const name of declared) if (Object.hasOwn(attributes, name)) names.add(name);
|
|
42592
|
-
}
|
|
42593
|
-
const prior = noEchoAttributeNamesOf(record);
|
|
42594
|
-
for (const name of prior ?? []) if (Object.hasOwn(attributes, name) && carriesSecretMask(attributes[name])) names.add(name);
|
|
42595
|
-
if (declared === void 0 && prior === void 0 && !echoed) return void 0;
|
|
42596
|
-
return [...names].sort();
|
|
42597
|
-
}
|
|
42598
|
-
function applyNoEchoPersist(logicalId, record, scrubbed, templateProps, resources, secrets, carried = false) {
|
|
42599
|
-
const sources = this.noEchoPositionSources(resources);
|
|
42600
|
-
if (sources === void 0) return scrubbed;
|
|
42601
|
-
const leaves = this.noEchoLeavesFor(logicalId, record, templateProps, sources);
|
|
42602
|
-
const names = noEchoAttributeNamesFor(this, logicalId, record, carried, leaves);
|
|
42603
|
-
if (leaves === void 0 && names === void 0) return scrubbed;
|
|
42604
|
-
const next = { ...scrubbed };
|
|
42605
|
-
if (leaves !== void 0) {
|
|
42606
|
-
next.properties = maskAtCoordinates(scrubbed.properties, leaves);
|
|
42607
|
-
if (scrubbed.observedProperties !== void 0 && leaves.length > 0) Object.assign(next, { observedProperties: maskReadbackAtCoordinates(scrubbed.observedProperties, record.properties, leaves) });
|
|
42608
|
-
if (leaves.length > 0) next.noEchoLeaves = leaves;
|
|
42609
|
-
else delete next.noEchoLeaves;
|
|
42610
|
-
const marked = new Set(leaves.map((coordinate) => JSON.stringify(coordinate)));
|
|
42611
|
-
const exact = (noEchoExactEchoLeavesOf(scrubbed) ?? []).filter((coordinate) => marked.has(JSON.stringify(coordinate)));
|
|
42612
|
-
if (exact.length > 0) next.noEchoExactEchoLeaves = exact;
|
|
42613
|
-
else delete next.noEchoExactEchoLeaves;
|
|
42614
|
-
}
|
|
42615
|
-
if (names !== void 0) {
|
|
42616
|
-
if (scrubbed.attributes !== void 0 && names.length > 0) {
|
|
42617
|
-
const attributes = { ...scrubbed.attributes };
|
|
42618
|
-
for (const name of names) if (Object.hasOwn(attributes, name)) attributes[name] = maskWholeValue(attributes[name]);
|
|
42619
|
-
next.attributes = attributes;
|
|
42620
|
-
}
|
|
42621
|
-
if (names.length > 0) next.noEchoAttributeNames = names;
|
|
42622
|
-
else delete next.noEchoAttributeNames;
|
|
42623
|
-
}
|
|
42624
|
-
this.warnNoEchoPhysicalId(logicalId, record, secrets);
|
|
42625
|
-
return next;
|
|
42626
|
-
}
|
|
42627
|
-
function warnNoEchoPhysicalId(logicalId, record, secrets) {
|
|
42628
|
-
if (secrets === void 0 || this.noEchoPhysicalIdWarned.has(logicalId)) return;
|
|
42629
|
-
const values = noEchoParameterPlaintextsOf(secrets);
|
|
42630
|
-
if (values.length === 0 || typeof record.physicalId !== "string") return;
|
|
42631
|
-
if (!values.some((value) => record.physicalId.includes(value))) return;
|
|
42632
|
-
this.noEchoPhysicalIdWarned.add(logicalId);
|
|
42633
|
-
this.logger.warn(this.maskForResource(logicalId, safeMsg`${logicalId}: its physical id contains a NoEcho parameter value. AWS publishes a resource's name, so cdkd keeps the physical id in state as AWS returns it.`));
|
|
42634
|
-
}
|
|
42635
|
-
function seedPersistedNoEchoAttributes(resources) {
|
|
42636
|
-
this.persistedNoEchoAttributes = /* @__PURE__ */ new Map();
|
|
42637
|
-
for (const [logicalId, record] of Object.entries(resources)) {
|
|
42638
|
-
const names = noEchoAttributeNamesOf(record);
|
|
42639
|
-
if (names !== void 0 && names.length > 0) this.persistedNoEchoAttributes.set(logicalId, new Set(names));
|
|
42640
|
-
}
|
|
42641
|
-
}
|
|
42642
|
-
function maskOutputsByPosition(outputs) {
|
|
42643
|
-
const sources = this.noEchoPositionSources();
|
|
42644
|
-
if (sources === void 0) return outputs;
|
|
42645
|
-
const templateValues = Object.create(null);
|
|
42646
|
-
for (const [name, definition] of Object.entries(this.constructPathTemplate?.Outputs ?? {})) templateValues[name] = definition?.Value;
|
|
42647
|
-
if (this.outputsSourceUsable) for (const [name, value] of Object.entries(this.outputsTemplateSource)) templateValues[name] = value;
|
|
42648
|
-
const coordinates = noEchoCoordinatesOf(templateValues, outputs, sources);
|
|
42649
|
-
if (coordinates.length === 0) return outputs;
|
|
42650
|
-
const maskedValues = new Set(coordinates.filter((coordinate) => coordinate.length === 1 && typeof coordinate[0] === "string").map((coordinate) => keyOrderFreeJson(outputs[coordinate[0]])));
|
|
42651
|
-
const aliasCoordinates = Object.keys(outputs).filter((key) => !Object.hasOwn(templateValues, key) && outputs[key] !== void 0 && !carriesSecretMask(outputs[key]) && maskedValues.has(keyOrderFreeJson(outputs[key]))).map((key) => [key]);
|
|
42652
|
-
return maskAtCoordinates(outputs, [...coordinates, ...aliasCoordinates]);
|
|
42653
|
-
}
|
|
42654
|
-
function getAttTargetsOf(node) {
|
|
42655
|
-
const targets = [];
|
|
42656
|
-
const seen = /* @__PURE__ */ new Set();
|
|
42657
|
-
const subVariable = /\$\{([^}!][^}]*)\}/g;
|
|
42658
|
-
const walk = (value) => {
|
|
42659
|
-
if (value === null || typeof value !== "object" || seen.has(value)) return;
|
|
42660
|
-
seen.add(value);
|
|
42661
|
-
if (Array.isArray(value)) {
|
|
42662
|
-
for (const item of value) walk(item);
|
|
42663
|
-
return;
|
|
42664
|
-
}
|
|
42665
|
-
const record = value;
|
|
42666
|
-
const getAtt = record["Fn::GetAtt"];
|
|
42667
|
-
if (typeof getAtt === "string" && getAtt.indexOf(".") > 0) {
|
|
42668
|
-
const dot = getAtt.indexOf(".");
|
|
42669
|
-
targets.push([getAtt.slice(0, dot), getAtt.slice(dot + 1)]);
|
|
42670
|
-
} else if (Array.isArray(getAtt) && typeof getAtt[0] === "string" && typeof getAtt[1] === "string") targets.push([getAtt[0], getAtt[1]]);
|
|
42671
|
-
const sub = record["Fn::Sub"];
|
|
42672
|
-
const text = typeof sub === "string" ? sub : Array.isArray(sub) ? sub[0] : void 0;
|
|
42673
|
-
if (typeof text === "string") for (const match of text.matchAll(subVariable)) {
|
|
42674
|
-
const name = match[1].trim();
|
|
42675
|
-
const dot = name.indexOf(".");
|
|
42676
|
-
if (dot > 0) targets.push([name.slice(0, dot), name.slice(dot + 1)]);
|
|
42677
|
-
}
|
|
42678
|
-
for (const child of Object.values(record)) walk(child);
|
|
42679
|
-
};
|
|
42680
|
-
walk(node);
|
|
42681
|
-
return targets;
|
|
42682
|
-
}
|
|
42683
|
-
async function noEchoAttributeOverridesFor(desiredProps, stateResources, stackName) {
|
|
42684
|
-
const wanted = /* @__PURE__ */ new Map();
|
|
42685
|
-
for (const [logicalId, attribute] of getAttTargetsOf(desiredProps)) {
|
|
42686
|
-
const record = Object.hasOwn(stateResources, logicalId) ? stateResources[logicalId] : void 0;
|
|
42687
|
-
if (record === void 0) continue;
|
|
42688
|
-
if (noEchoAttributeNamesOf(record)?.includes(attribute) !== true) continue;
|
|
42689
|
-
if (!carriesSecretMask(record.attributes?.[attribute])) continue;
|
|
42690
|
-
if (!this.perResourceSecrets.has(logicalId)) continue;
|
|
42691
|
-
const set = wanted.get(logicalId) ?? /* @__PURE__ */ new Set();
|
|
42692
|
-
set.add(attribute);
|
|
42693
|
-
wanted.set(logicalId, set);
|
|
42694
|
-
}
|
|
42695
|
-
if (wanted.size === 0) return void 0;
|
|
42696
|
-
const overrides = /* @__PURE__ */ new Map();
|
|
42697
|
-
for (const [logicalId, attributes] of wanted) {
|
|
42698
|
-
const record = stateResources[logicalId];
|
|
42699
|
-
let read = this.noEchoAttributeReads.get(logicalId);
|
|
42700
|
-
if (read === void 0) {
|
|
42701
|
-
read = (async () => {
|
|
42702
|
-
try {
|
|
42703
|
-
const { provider } = this.providerRegistry.getProviderFor({
|
|
42704
|
-
resourceType: record.resourceType,
|
|
42705
|
-
properties: record.properties,
|
|
42706
|
-
provisionedBy: record.provisionedBy,
|
|
42707
|
-
previousProperties: record.properties
|
|
42708
|
-
});
|
|
42709
|
-
const outcome = await readRecordAttributes({
|
|
42710
|
-
provider,
|
|
42711
|
-
logicalId,
|
|
42712
|
-
resource: record,
|
|
42713
|
-
stackName,
|
|
42714
|
-
region: this.stackRegion
|
|
42715
|
-
});
|
|
42716
|
-
return outcome.kind === "read" ? outcome.attributes : void 0;
|
|
42717
|
-
} catch {
|
|
42718
|
-
return;
|
|
42719
|
-
}
|
|
42720
|
-
})();
|
|
42721
|
-
this.noEchoAttributeReads.set(logicalId, read);
|
|
42722
|
-
}
|
|
42723
|
-
const live = await read;
|
|
42724
|
-
if (live === void 0) continue;
|
|
42725
|
-
const secrets = this.perResourceSecrets.get(logicalId);
|
|
42726
|
-
const fresh = noEchoParameterPlaintextsOf(secrets);
|
|
42727
|
-
const positioned = this.noEchoPositionedValues.get(logicalId) ?? /* @__PURE__ */ new Set();
|
|
42728
|
-
const served = {};
|
|
42729
|
-
for (const attribute of attributes) {
|
|
42730
|
-
if (!Object.hasOwn(live, attribute)) continue;
|
|
42731
|
-
const value = live[attribute];
|
|
42732
|
-
if (typeof value === "string" && fresh.some((needle) => value === needle || value.includes(needle)) || value !== void 0 && positioned.has(keyOrderFreeJson(value))) served[attribute] = value;
|
|
42733
|
-
}
|
|
42734
|
-
if (Object.keys(served).length > 0) overrides.set(logicalId, served);
|
|
42735
|
-
}
|
|
42736
|
-
return overrides.size > 0 ? overrides : void 0;
|
|
42737
|
-
}
|
|
42738
|
-
function noEchoDiffComparison(resources, template, conditions, parameterValues, stackName) {
|
|
42739
|
-
const sources = this.noEchoPositionSources(resources, template, conditions);
|
|
42740
|
-
if (sources === void 0) return void 0;
|
|
42741
|
-
const compare = noEchoComparison({
|
|
42742
|
-
sources,
|
|
42743
|
-
values: parameterValues,
|
|
42744
|
-
minNeedleLength: 4,
|
|
42745
|
-
publicTokens: /* @__PURE__ */ new Set([this.stackRegion, ...stackName === void 0 ? [] : [stackName]])
|
|
42746
|
-
});
|
|
42747
|
-
return (input) => compare(input);
|
|
42748
|
-
}
|
|
42749
|
-
function freshNoEchoParametersWithDeclared(inherited, template) {
|
|
42750
|
-
const all = /* @__PURE__ */ new Set([...inherited ?? [], ...noEchoParameterNamesOf(template)]);
|
|
42751
|
-
return all.size > 0 ? all : void 0;
|
|
42752
|
-
}
|
|
42753
|
-
function noEchoComparisonForTemplate(template, knownConditions, values, resources, publicTokens, inheritedNoEchoParameters) {
|
|
42754
|
-
const sources = {
|
|
42755
|
-
parameters: /* @__PURE__ */ new Set([...noEchoParameterNamesOf(template), ...inheritedNoEchoParameters ?? []]),
|
|
42756
|
-
attributeIsNoEcho: (logicalId, attribute) => noEchoAttributeNamesOf(Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0)?.includes(attribute) === true,
|
|
42757
|
-
...knownConditions !== void 0 && { conditions: knownConditions }
|
|
42758
|
-
};
|
|
42759
|
-
const compare = noEchoComparison({
|
|
42760
|
-
sources,
|
|
42761
|
-
values: values ?? {},
|
|
42762
|
-
minNeedleLength: 4,
|
|
42763
|
-
...publicTokens !== void 0 && { publicTokens }
|
|
42764
|
-
});
|
|
42765
|
-
return (input) => compare(input);
|
|
42766
|
-
}
|
|
42767
|
-
|
|
42768
42919
|
//#endregion
|
|
42769
42920
|
//#region src/analyzer/security-changes.ts
|
|
42770
42921
|
const RESOURCE_SCRUTINY = {
|
|
@@ -44256,7 +44407,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44256
44407
|
}, stackName);
|
|
44257
44408
|
const updateSecrets = context.recordedSecretValues ?? /* @__PURE__ */ new Map();
|
|
44258
44409
|
this.perResourceSecrets.set(logicalId, updateSecrets);
|
|
44259
|
-
const noEchoOverrides = await this.
|
|
44410
|
+
const noEchoOverrides = await noEchoAttributeOverridesFor(this.noEchoRun, this.noEchoDeps(), desiredProps, stateResources, stackName);
|
|
44260
44411
|
if (noEchoOverrides !== void 0) context.noEchoAttributeOverrides = noEchoOverrides;
|
|
44261
44412
|
printNestedStackReadsOnly(context, resourceType, this.secretNameBagFor(logicalId));
|
|
44262
44413
|
const resolvedProps = await this.resolver.resolve(desiredProps, context);
|
|
@@ -44268,7 +44419,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44268
44419
|
this.perResourceTemplateProps.set(logicalId, desiredProps);
|
|
44269
44420
|
this.perResourceResolvedType.set(logicalId, resourceType);
|
|
44270
44421
|
recordNestedStackParameterExpressions(updateSecrets, resourceType, resolvedProps, desiredProps);
|
|
44271
|
-
this.
|
|
44422
|
+
auditResolvedAssetReferences(this.options, logicalId, resourceType, resolvedProps);
|
|
44272
44423
|
const lostCandidate = childLostWithRecreatedParent({
|
|
44273
44424
|
resourceType,
|
|
44274
44425
|
templateProperties: desiredProps,
|
|
@@ -44279,7 +44430,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44279
44430
|
const lostChild = lostCandidate?.mode === "reattach" || lostCandidate !== void 0 && Object.hasOwn(resolvedProps, lostCandidate.property) && Object.hasOwn(currentProps, lostCandidate.property) && keyOrderFreeJson(resolvedProps[lostCandidate.property]) === keyOrderFreeJson(currentProps[lostCandidate.property]) ? lostCandidate : void 0;
|
|
44280
44431
|
const lostWithParent = lostChild?.mode === "recreate" ? lostChild.parent : void 0;
|
|
44281
44432
|
this.registerNoEchoAttributes(logicalId, Object.assign(currentResource.attributes === void 0 ? {} : { attributes: currentResource.attributes }, { physicalId: currentResource.physicalId }), updateSecrets, resolvedProps);
|
|
44282
|
-
const noEchoSources = this.
|
|
44433
|
+
const noEchoSources = noEchoPositionSources(this.noEchoRun, stateResources, template, conditions);
|
|
44283
44434
|
const parameterCoordinates = noEchoSources === void 0 ? [] : canonicalCoordinates(noEchoCoordinatesOf(desiredProps, resolvedProps, {
|
|
44284
44435
|
parameters: noEchoSources.parameters,
|
|
44285
44436
|
...noEchoSources.conditions !== void 0 && { conditions: noEchoSources.conditions }
|
|
@@ -44296,7 +44447,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44296
44447
|
return resolved !== void 0 && !carriesSecretMask(resolved);
|
|
44297
44448
|
});
|
|
44298
44449
|
const comparisonCoordinates = canonicalCoordinates([...noEchoCoordinates, ...staleCoordinates]);
|
|
44299
|
-
if (parameterCoordinates.length > 0) this.noEchoPositionedValues.set(logicalId, new Set(parameterCoordinates.map((coordinate) => keyOrderFreeJson(valueAtCoordinate(resolvedProps, coordinate)))));
|
|
44450
|
+
if (parameterCoordinates.length > 0) this.noEchoRun.noEchoPositionedValues.set(logicalId, new Set(parameterCoordinates.map((coordinate) => keyOrderFreeJson(valueAtCoordinate(resolvedProps, coordinate)))));
|
|
44300
44451
|
const fingerprintSources = template && this.maskedInputSources(template, stateResources, conditions, stackName);
|
|
44301
44452
|
const fingerprints = fingerprintSources && inputFingerprinter(desiredProps, fingerprintSources);
|
|
44302
44453
|
const movedMasked = new Set(await movedMaskedProperties(currentResource, desiredProps, fingerprints));
|
|
@@ -44305,7 +44456,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44305
44456
|
this.fingerprintNoEchoValues,
|
|
44306
44457
|
this.options.inheritedSecrets
|
|
44307
44458
|
]), fingerprints));
|
|
44308
|
-
if (resourceType === "AWS::CloudFormation::Stack") recordPassedNoEchoParameters(updateSecrets, desiredProps["Parameters"], this.
|
|
44459
|
+
if (resourceType === "AWS::CloudFormation::Stack") recordPassedNoEchoParameters(updateSecrets, desiredProps["Parameters"], noEchoPositionSources(this.noEchoRun, stateResources));
|
|
44309
44460
|
if (fingerprintSources !== void 0 && resourceType === "AWS::CloudFormation::Stack") recordPassedParameterClasses(updateSecrets, await classifyPassedParameters(desiredProps["Parameters"], fingerprintSources));
|
|
44310
44461
|
const desiredForSkipCheck = maskAtCoordinates(redactSecretsForState(markSameGenerationBag({ ...resolvedProps }), updateSecrets, desiredProps), comparisonCoordinates);
|
|
44311
44462
|
const legacyDesired = withoutPhysicalNameCopies(updateSecrets, () => maskAtCoordinates(redactSecretsForState(markSameGenerationBag({ ...resolvedProps }), updateSecrets, desiredProps), comparisonCoordinates));
|
|
@@ -44353,7 +44504,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44353
44504
|
const witness = todayAsWritten === void 0 ? void 0 : witnessNormalize(recordedAsWritten, todayAsWritten, desiredForSkipCheckAsWritten);
|
|
44354
44505
|
const currentPropsAsWritten = witness === void 0 ? recordedAsWritten : witness.current;
|
|
44355
44506
|
const witnessMigrates = unmarkedRecord || (witness?.confirmed.length ?? 0) > 0;
|
|
44356
|
-
if (!unmarkedRecord && witness !== void 0 && witness.confirmed.length > 0) this.witnessConfirmedLeaves.set(logicalId, witness.confirmed.map((coordinate) => [...coordinate]));
|
|
44507
|
+
if (!unmarkedRecord && witness !== void 0 && witness.confirmed.length > 0) this.noEchoRun.witnessConfirmedLeaves.set(logicalId, witness.confirmed.map((coordinate) => [...coordinate]));
|
|
44357
44508
|
for (const coordinate of witness?.differing ?? []) {
|
|
44358
44509
|
const desiredAt = valueAtCoordinate(desiredForSkipCheckAsWritten, coordinate);
|
|
44359
44510
|
recordPreviousNoEchoLeaves(this.secretNameBagFor(logicalId), valueAtCoordinate(recordedAsWritten, coordinate), scalarLeavesOf(desiredAt), updateSecrets, desiredAt !== "***");
|
|
@@ -44428,7 +44579,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44428
44579
|
this.logger.info(safeMsg` ↻ ${logicalId} (${resourceType}) attribute update: ${attrSummary}`);
|
|
44429
44580
|
stateResources[logicalId] = {
|
|
44430
44581
|
...stateResources[logicalId] ?? currentResource,
|
|
44431
|
-
...
|
|
44582
|
+
...extractTemplateAttributes(template, logicalId)
|
|
44432
44583
|
};
|
|
44433
44584
|
if (counts) counts.updated++;
|
|
44434
44585
|
if (progress) progress.current++;
|
|
@@ -44444,7 +44595,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44444
44595
|
} : currentResource;
|
|
44445
44596
|
let readback;
|
|
44446
44597
|
const readOnce = () => readback ??= this.readReaderForFreshNoEchoCeiling(logicalId, readbackRecord, updateSecrets).then((read) => {
|
|
44447
|
-
this.
|
|
44598
|
+
noteNoEchoExactEchoes(this.noEchoRun, logicalId, currentResource.physicalId, read, readbackRecord.properties, echoCandidates, "add");
|
|
44448
44599
|
return read;
|
|
44449
44600
|
});
|
|
44450
44601
|
const exactEchoCoordinates = new Set((noEchoExactEchoLeavesOf(currentResource) ?? []).map((c) => JSON.stringify(c)));
|
|
@@ -44496,7 +44647,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44496
44647
|
const lateReplacementDeclined = /* @__PURE__ */ new Set();
|
|
44497
44648
|
const differsWhy = (key) => !lateReplacementDeclined.has(key) ? "differs; the provider is not known to report this property exactly, so the difference may be its normalization" : lateCrossPrefixRefused ? "differs; the replacement was refused: see the state-prefix warning above" : `differs; the replacement was not approved (--require-approval=${this.options.requireApproval ?? "never"})`;
|
|
44498
44649
|
if (witnessMigrates && !typeChanged && echoCandidates.length > 0 && hasAddressablePhysicalId(currentResource)) await readOnce();
|
|
44499
|
-
if (!typeChanged && !suppliesFreshMaskOnlyValue && lostChild === void 0 && this.
|
|
44650
|
+
if (!typeChanged && !suppliesFreshMaskOnlyValue && lostChild === void 0 && recreateDirectionFor(this.options, stackName, logicalId) === void 0 && recordMatchesDesired) {
|
|
44500
44651
|
if (provenanceUnchanged.length > 0) stateResources[logicalId] = withRefreshedReadVersions(stateResources[logicalId] ?? currentResource, provenanceUnchanged);
|
|
44501
44652
|
if (change.attributeChanges && change.attributeChanges.length > 0) {
|
|
44502
44653
|
applyAttributeOnlyUpdate(change.attributeChanges);
|
|
@@ -44582,7 +44733,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44582
44733
|
};
|
|
44583
44734
|
const lowered = [];
|
|
44584
44735
|
const movedAt = (path) => movedMasked.has(path) || rewrittenPaths.has(path) || keyOrderFreeJson(desiredForSkipCheckAsWritten[path]) !== keyOrderFreeJson(currentPropsAsWritten[path]);
|
|
44585
|
-
replacedAnyway = this.
|
|
44736
|
+
replacedAnyway = recreateDirectionFor(this.options, stackName, logicalId) !== void 0 || lostWithParent !== void 0 || (change.propertyChanges ?? []).some((other) => other.requiresReplacement && (!parameterCreateOnlyPaths.has(other.path) || movedAt(other.path)));
|
|
44586
44737
|
for (const pc of change.propertyChanges ?? []) {
|
|
44587
44738
|
if (!parameterCreateOnlyPaths.has(pc.path)) {
|
|
44588
44739
|
lowered.push(pc);
|
|
@@ -44629,7 +44780,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44629
44780
|
}
|
|
44630
44781
|
}
|
|
44631
44782
|
const confirmedPaths = /* @__PURE__ */ new Set([...noEchoHeldPaths, ...parameterSettledPaths]);
|
|
44632
|
-
if (confirmedPaths.size > 0 && !typeChanged && lostChild === void 0 && this.
|
|
44783
|
+
if (confirmedPaths.size > 0 && !typeChanged && lostChild === void 0 && recreateDirectionFor(this.options, stackName, logicalId) === void 0 && recordMatchesDesired && Object.keys(resolvedProps).every((key) => confirmedPaths.has(key) || otherFreshAt(key).length === 0 && !pendingParameterLeaves.has(key))) {
|
|
44633
44784
|
this.logger.debug(safeMsg`Skipping ${logicalId}: AWS already holds every NoEcho value it carries, and nothing else changed`);
|
|
44634
44785
|
const staleHeld = staleCoordinates.filter((coordinate) => typeof coordinate[0] === "string" && parameterHeldKeys.has(coordinate[0]));
|
|
44635
44786
|
if (staleHeld.length > 0) {
|
|
@@ -44672,7 +44823,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44672
44823
|
}
|
|
44673
44824
|
const liveLabel = this.liveTaskLabels.get(logicalId);
|
|
44674
44825
|
if (needsReplacement && liveLabel !== void 0 && !liveLabel.replacing) {
|
|
44675
|
-
const label = `Replacing ${logicalId} (${resourceType})${this.
|
|
44826
|
+
const label = `Replacing ${logicalId} (${resourceType})${peekRoutingForLabel(this.providerRegistry, this.options, change, currentResource, stackName, logicalId, true, recreateDirectionFor(this.options, stackName, logicalId)) === "cc-api" ? " [CC API]" : ""}`;
|
|
44676
44827
|
this.liveTaskLabels.set(logicalId, {
|
|
44677
44828
|
label,
|
|
44678
44829
|
replacing: true,
|
|
@@ -44680,7 +44831,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44680
44831
|
});
|
|
44681
44832
|
renderer.updateTaskLabel(logicalId, `${label}${liveLabel.warnSuffix ?? ""}`);
|
|
44682
44833
|
} else if (!needsReplacement && liveLabel !== void 0 && liveLabel.replacing) {
|
|
44683
|
-
const label = `Updating ${logicalId} (${resourceType})${this.
|
|
44834
|
+
const label = `Updating ${logicalId} (${resourceType})${peekRoutingForLabel(this.providerRegistry, this.options, change, currentResource, stackName, logicalId, false, recreateDirectionFor(this.options, stackName, logicalId)) === "cc-api" ? " [CC API]" : ""}`;
|
|
44684
44835
|
this.liveTaskLabels.set(logicalId, {
|
|
44685
44836
|
label,
|
|
44686
44837
|
replacing: false,
|
|
@@ -44688,7 +44839,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
44688
44839
|
});
|
|
44689
44840
|
renderer.updateTaskLabel(logicalId, `${label}${liveLabel.warnSuffix ?? ""}`);
|
|
44690
44841
|
}
|
|
44691
|
-
const dependencies =
|
|
44842
|
+
const dependencies = extractAllDependencies(template, logicalId);
|
|
44692
44843
|
const updateReplacePolicy = template?.Resources?.[logicalId]?.UpdateReplacePolicy;
|
|
44693
44844
|
const markRestored = (outcome) => {
|
|
44694
44845
|
if (lostChild === void 0) return outcome;
|
|
@@ -44798,7 +44949,7 @@ function redactionRewrittenPaths(resolvedProps, desiredForSkipCheck, comparisonC
|
|
|
44798
44949
|
return new Set(Object.keys(masked).filter((key) => keyOrderFreeJson(masked[key]) !== keyOrderFreeJson(desiredForSkipCheck[key])));
|
|
44799
44950
|
}
|
|
44800
44951
|
function readsProducerReplacedThisRun(template, logicalId, stateResources) {
|
|
44801
|
-
return (
|
|
44952
|
+
return (extractAllDependencies(template, logicalId) ?? []).some((id) => {
|
|
44802
44953
|
const loaded = Object.hasOwn(this.healBaseline, id) ? this.healBaseline[id] : void 0;
|
|
44803
44954
|
if (loaded === void 0) return false;
|
|
44804
44955
|
const now = Object.hasOwn(stateResources, id) ? stateResources[id] : void 0;
|
|
@@ -44806,6 +44957,56 @@ function readsProducerReplacedThisRun(template, logicalId, stateResources) {
|
|
|
44806
44957
|
});
|
|
44807
44958
|
}
|
|
44808
44959
|
|
|
44960
|
+
//#endregion
|
|
44961
|
+
//#region src/deployment/deploy-engine/name-collision.ts
|
|
44962
|
+
function replacementNameOrigin(logicalId, physicalId) {
|
|
44963
|
+
if (looksLikeCdkdGeneratedName(physicalId, logicalId, getCurrentStackName())) return {
|
|
44964
|
+
descriptor: `The physical name (${physicalId}) was GENERATED by cdkd from the construct's logical id rather than declared in your template, and that derivation has no random component — so the new resource asks for exactly the name the existing one still holds`,
|
|
44965
|
+
remedy: "Either give the resource an explicit physical name in your CDK code, or rename the CONSTRUCT (its id feeds the generated name — note that this replaces the resource rather than renaming it in place)"
|
|
44966
|
+
};
|
|
44967
|
+
return {
|
|
44968
|
+
descriptor: `The resource has a user-supplied physical name (${physicalId})`,
|
|
44969
|
+
remedy: "Either rename the resource in your CDK code (a fresh name lets the safe create-first order proceed)"
|
|
44970
|
+
};
|
|
44971
|
+
}
|
|
44972
|
+
function orphanedNameCollisionAdvice(providerRegistry, changeType, logicalId, error) {
|
|
44973
|
+
if (changeType !== "CREATE") return void 0;
|
|
44974
|
+
if (!(error instanceof ProvisioningError)) return void 0;
|
|
44975
|
+
const physicalId = error.physicalId;
|
|
44976
|
+
if (!physicalId) return void 0;
|
|
44977
|
+
const replayed = isReplayedNameCollisionFrom(error, logicalId, (link) => isAuxiliaryMarkOf(link, RETRY_AUXILIARY_OWNER));
|
|
44978
|
+
if (!replayed && !isNameCollisionErrorFrom(error, logicalId)) return void 0;
|
|
44979
|
+
const stackName = getCurrentStackName();
|
|
44980
|
+
if (!looksLikeCdkdGeneratedName(physicalId, logicalId, stackName)) return void 0;
|
|
44981
|
+
if (!stackName) return void 0;
|
|
44982
|
+
const safeId = displaySafe(physicalId, { asciiOnly: true });
|
|
44983
|
+
const safeStack = displaySafe(stackName, { asciiOnly: true });
|
|
44984
|
+
const safeLogicalId = displaySafe(logicalId, { asciiOnly: true });
|
|
44985
|
+
const idShown = isInertUnquoted(safeId);
|
|
44986
|
+
const shownId = idShown ? safeId : "a name that cannot be shown safely here";
|
|
44987
|
+
const shownLogicalId = isInertUnquoted(safeLogicalId) ? safeLogicalId : "A resource whose logical id cannot be shown safely here";
|
|
44988
|
+
const diagnosis = replayed ? `${shownLogicalId}: the name AWS reports as taken (${shownId}) is most likely held by a resource THIS create made. An earlier attempt of it ended without a clear verdict (a server error, a dropped connection or a timeout, or a failure after the create call itself may have succeeded), and the retry then found the name taken. A dropped connection can also happen before the request reached AWS, so the holder may be another resource: confirm it is yours before deleting or importing it. cdkd records a resource only once its create succeeds, so this one is in no state file: no rollback or cdkd destroy will remove it, and re-running collides with it again.` : `${shownLogicalId}: the name AWS reports as taken (${shownId}) is one cdkd DERIVED from the logical id, and that derivation has no random component — so this is most likely a resource an earlier cdkd run left behind. A rollback leaves a resource carrying DeletionPolicy: Retain in AWS and drops it from state, as CloudFormation does; what differs is the name. CloudFormation would generate a fresh one for an unnamed resource and redeploy clean, whereas cdkd asks again for the name the orphan still holds — so re-running does not clear this.`;
|
|
44989
|
+
const deleteArm = `If it is not a resource you want to keep, delete ${idShown ? safeId : "it"} in AWS — after confirming it holds nothing you need${replayed ? "" : ", since Retain is what kept it"} — and re-deploy.`;
|
|
44990
|
+
let canImport;
|
|
44991
|
+
try {
|
|
44992
|
+
canImport = typeof providerRegistry.getProvider(error.resourceType).import === "function";
|
|
44993
|
+
} catch {
|
|
44994
|
+
canImport = false;
|
|
44995
|
+
}
|
|
44996
|
+
const commandNamesTheRightResource = safeId === physicalId && safeStack === stackName && safeLogicalId === logicalId;
|
|
44997
|
+
const importableTarget = !stackName.includes("~");
|
|
44998
|
+
if (!canImport || !commandNamesTheRightResource || !importableTarget) return `${diagnosis} ${!canImport ? `cdkd cannot adopt ${displaySafe(error.resourceType, { asciiOnly: true })} back into state (its provider implements no import)` : !importableTarget ? `this is a nested-stack child, whose stack name cdkd import cannot resolve` : `cdkd cannot render an import command that provably names this resource`}, so the way forward is to delete it. ${deleteArm}`;
|
|
44999
|
+
const adopt = pasteableCommand("cdkd import", [{
|
|
45000
|
+
value: stackName,
|
|
45001
|
+
hole: "stack"
|
|
45002
|
+
}, {
|
|
45003
|
+
flag: "--resource",
|
|
45004
|
+
value: `${logicalId}=${physicalId}`,
|
|
45005
|
+
hole: "logicalId=physicalId"
|
|
45006
|
+
}]);
|
|
45007
|
+
return `${diagnosis} To recover, adopt it back into state instead of re-creating it, with the command below (a selective import merges into existing state and needs no --force while the resource is absent from it). CONFIRM IT IS YOURS FIRST — a name cdkd derives is predictable, so for a globally-namespaced type it can belong to another account, and the same stack deployed in another region derives the same name. ${deleteArm}${adopt.withheld.length === 0 ? "" : " The command below prints a quoted hole in place of a value cdkd will not name on a command line; replace it whole, quotes included, with your stack name or '<logicalId>=<name>', shell-quoted."}\nAdopt with: ${adopt.command}`;
|
|
45008
|
+
}
|
|
45009
|
+
|
|
44809
45010
|
//#endregion
|
|
44810
45011
|
//#region src/deployment/deploy-engine/update-replace.ts
|
|
44811
45012
|
async function updateByReplacement({ change, counts, currentProps, currentResource, dependencies, logicalId, oldResourceType, progress, propertyDrivenReplacement, recreateFlagged, recreateViaCcApi, recreateViaSdkProvider, renderer, resolvedProps, resourceType, stackName, stateResources, template, typeChanged, updateReplacePolicy, updateSecrets, lostWithParent }) {
|
|
@@ -44813,10 +45014,10 @@ async function updateByReplacement({ change, counts, currentProps, currentResour
|
|
|
44813
45014
|
record: currentResource,
|
|
44814
45015
|
templateResource: template?.Resources?.[logicalId],
|
|
44815
45016
|
resolvedProperties: resolvedProps,
|
|
44816
|
-
noEchoParameters: this.
|
|
44817
|
-
conditions: this.noEchoConditions,
|
|
45017
|
+
noEchoParameters: noEchoPositionSources(this.noEchoRun, stateResources, template)?.parameters ?? /* @__PURE__ */ new Set(),
|
|
45018
|
+
conditions: this.noEchoRun.noEchoConditions,
|
|
44818
45019
|
secrets: updateSecrets,
|
|
44819
|
-
inputSources: template && this.maskedInputSources(template, stateResources, this.noEchoConditions, stackName)
|
|
45020
|
+
inputSources: template && this.maskedInputSources(template, stateResources, this.noEchoRun.noEchoConditions, stackName)
|
|
44820
45021
|
});
|
|
44821
45022
|
if (propertyDrivenReplacement && !recreateFlagged && updateReplacePolicy !== "Retain") {
|
|
44822
45023
|
const statefulReason = isStatefulRecreateTargetForReplace(oldResourceType, currentProps, currentResource.observedProperties);
|
|
@@ -44846,7 +45047,7 @@ async function updateByReplacement({ change, counts, currentProps, currentResour
|
|
|
44846
45047
|
...recreateViaCcApi && { forceCcApi: true }
|
|
44847
45048
|
});
|
|
44848
45049
|
const replaceProvider = replaceDecision.provider;
|
|
44849
|
-
const replaceProps = replaceDecision.provisionedBy === "cc-api" ? this.
|
|
45050
|
+
const replaceProps = replaceDecision.provisionedBy === "cc-api" ? preparePropertiesForCcApi(this.providerRegistry, resourceType, resolvedProps, logicalId) : resolvedProps;
|
|
44850
45051
|
const oldDeleteRoute = this.providerRegistry.getProviderFor({
|
|
44851
45052
|
resourceType: oldResourceType,
|
|
44852
45053
|
provisionedBy: currentResource.provisionedBy
|
|
@@ -44958,7 +45159,7 @@ async function updateByReplacement({ change, counts, currentProps, currentResour
|
|
|
44958
45159
|
} catch (createError) {
|
|
44959
45160
|
const createMsg = displayAwsMessage(maskSecretsInText(createError instanceof Error ? createError.message : String(createError), updateSecrets));
|
|
44960
45161
|
if (!isNameCollisionErrorFrom(createError, logicalId)) throw createError;
|
|
44961
|
-
const nameOrigin =
|
|
45162
|
+
const nameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
|
|
44962
45163
|
const nameHeldElsewhere = replacementRequestsDifferentName({
|
|
44963
45164
|
oldResourceType,
|
|
44964
45165
|
newResourceType: resourceType,
|
|
@@ -44992,7 +45193,7 @@ async function updateByReplacement({ change, counts, currentProps, currentResour
|
|
|
44992
45193
|
createResult = await this.replaceDeleteFirstAndRecreate(logicalId, resourceType, oldResourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateSecrets, updateReplacePolicy, oldDeleteRoute.provisionedBy, noEchoDeleteValues);
|
|
44993
45194
|
}
|
|
44994
45195
|
if (equalIdIsSameResource && !deletedOldFirst && createResult.physicalId === currentResource.physicalId) {
|
|
44995
|
-
const idempotentNameOrigin =
|
|
45196
|
+
const idempotentNameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
|
|
44996
45197
|
if (updateReplacePolicy === "Retain") throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create API is ` + `name-idempotent: the create-first attempt returned the existing resource ` + safeMsg`(${currentResource.physicalId}) instead of creating a new one, and ` + `UpdateReplacePolicy: Retain pins that resource in place. ` + safeMsg`${idempotentNameOrigin.descriptor}. ${idempotentNameOrigin.remedy} — with ` + "Retain, the old resource keeps the name, so a same-name replacement can never proceed.", "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
|
|
44997
45198
|
if (this.options.replace !== true) throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create API is ` + `name-idempotent: the create-first attempt returned the EXISTING resource ` + safeMsg`(${currentResource.physicalId}) instead of creating a new one, so deleting ` + `the "old" resource would silently destroy the resource the deploy just ` + safeMsg`reported as created. ${idempotentNameOrigin.descriptor}; ` + safeMsg`${idempotentNameOrigin.remedy}, or re-run with ` + "`cdkd deploy --replace` to delete the old resource FIRST and recreate it under the same name (the resource is briefly unavailable while it is recreated). Note: this branch is also reached when the old resource was deleted out-of-band and the physical id is name-derived — there the create was a genuine fresh create; `--replace` converges that case too.", "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
|
|
44998
45199
|
this.logger.info(` Create-first returned the existing resource (name-idempotent Create API) ` + safeMsg`and --replace is set — deleting old ${logicalId} ` + safeMsg`(${currentResource.physicalId}) first...`);
|
|
@@ -45020,20 +45221,21 @@ async function updateByReplacement({ change, counts, currentProps, currentResour
|
|
|
45020
45221
|
}
|
|
45021
45222
|
this.registerNoEchoAttributes(logicalId, createResult, updateSecrets, resolvedProps);
|
|
45022
45223
|
if (equalIdIsSameResource && createResult.physicalId === currentResource.physicalId) this.recreatedUnderSameId.add(logicalId);
|
|
45023
|
-
const recordedReplacementProperties =
|
|
45224
|
+
const recordedReplacementProperties = propertiesToRecord(resolvedProps, createResult, resourceType, replaceDecision.provisionedBy);
|
|
45024
45225
|
stateResources[logicalId] = {
|
|
45025
45226
|
physicalId: createResult.physicalId,
|
|
45026
45227
|
resourceType,
|
|
45027
45228
|
properties: recordedReplacementProperties,
|
|
45028
45229
|
...acceptedCreateOnlyDropsField(recordedReplacementProperties, resourceType, replaceDecision.provisionedBy, "new-resource"),
|
|
45029
45230
|
...createResult.attributes && { attributes: createResult.attributes },
|
|
45231
|
+
...secretNamedAttributesField(createResult),
|
|
45030
45232
|
...dependencies && dependencies.length > 0 && { dependencies },
|
|
45031
|
-
...
|
|
45233
|
+
...extractTemplateAttributes(template, logicalId),
|
|
45032
45234
|
provisionedBy: replaceDecision.provisionedBy
|
|
45033
45235
|
};
|
|
45034
45236
|
this.recordInlinePolicyWrite(logicalId, "create");
|
|
45035
|
-
await this.
|
|
45036
|
-
this.kickOffObservedCapture(replaceProvider, logicalId, createResult.physicalId, resourceType, resolvedProps, { afterOwnWrite: true }, updateSecrets);
|
|
45237
|
+
await establishNoEchoEchoFidelity(this.noEchoRun, this.noEchoDeps(), logicalId, stateResources[logicalId], resolvedProps, stateResources, updateSecrets);
|
|
45238
|
+
this.observedCapture.kickOffObservedCapture(replaceProvider, logicalId, createResult.physicalId, resourceType, resolvedProps, { afterOwnWrite: true }, updateSecrets);
|
|
45037
45239
|
if (counts) counts.updated++;
|
|
45038
45240
|
if (progress) progress.current++;
|
|
45039
45241
|
const replacePrefix = progress ? `[${progress.current}/${progress.total}] ` : " ";
|
|
@@ -45072,7 +45274,7 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45072
45274
|
properties: resolvedProps,
|
|
45073
45275
|
provisionedBy: currentResource.provisionedBy,
|
|
45074
45276
|
previousProperties: currentResource.properties,
|
|
45075
|
-
...this.
|
|
45277
|
+
...isPinnedToCcApi(this.options, stackName, logicalId) && { forceCcApi: true }
|
|
45076
45278
|
});
|
|
45077
45279
|
if (updateDecision.sdkMigration === true) {
|
|
45078
45280
|
const exemptMode = STICKY_CC_MIGRATION_EXEMPT.get(resourceType)?.mode;
|
|
@@ -45090,7 +45292,7 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45090
45292
|
this.logger.info(message);
|
|
45091
45293
|
}
|
|
45092
45294
|
const updateProvider = updateDecision.provider;
|
|
45093
|
-
const updateProps = updateDecision.provisionedBy === "cc-api" ? withoutGeneratedFallbackName(resourceType, resolvedProps, this.
|
|
45295
|
+
const updateProps = updateDecision.provisionedBy === "cc-api" ? withoutGeneratedFallbackName(resourceType, resolvedProps, preparePropertiesForCcApi(this.providerRegistry, resourceType, resolvedProps, logicalId)) : resolvedProps;
|
|
45094
45296
|
const { previous: previousWithSecretsDropped, dropped: droppedPrincipalKinds } = withUnchangedSecretPrincipalLists(resourceType, currentResource.physicalId, noEchoHeldPaths.size === 0 ? currentPropsAsWritten : {
|
|
45095
45297
|
...currentPropsAsWritten,
|
|
45096
45298
|
...Object.fromEntries([...noEchoHeldPaths].filter((path) => Object.prototype.hasOwnProperty.call(updateProps, path)).map((path) => [path, updateProps[path]]))
|
|
@@ -45142,7 +45344,7 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45142
45344
|
previousProperties: currentResource.properties
|
|
45143
45345
|
});
|
|
45144
45346
|
const replProvider = replDecision.provider;
|
|
45145
|
-
const replProps = replDecision.provisionedBy === "cc-api" ? this.
|
|
45347
|
+
const replProps = replDecision.provisionedBy === "cc-api" ? preparePropertiesForCcApi(this.providerRegistry, resourceType, resolvedProps, logicalId) : resolvedProps;
|
|
45146
45348
|
const fallbackNameChange = await this.checkedReplacementNameChange({
|
|
45147
45349
|
logicalId,
|
|
45148
45350
|
resourceType,
|
|
@@ -45160,10 +45362,10 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45160
45362
|
record: currentResource,
|
|
45161
45363
|
templateResource: template?.Resources?.[logicalId],
|
|
45162
45364
|
resolvedProperties: resolvedProps,
|
|
45163
|
-
noEchoParameters: this.
|
|
45164
|
-
conditions: this.noEchoConditions,
|
|
45365
|
+
noEchoParameters: noEchoPositionSources(this.noEchoRun, stateResources, template)?.parameters ?? /* @__PURE__ */ new Set(),
|
|
45366
|
+
conditions: this.noEchoRun.noEchoConditions,
|
|
45165
45367
|
secrets: updateSecrets,
|
|
45166
|
-
inputSources: template && this.maskedInputSources(template, stateResources, this.noEchoConditions, stackName)
|
|
45368
|
+
inputSources: template && this.maskedInputSources(template, stateResources, this.noEchoRun.noEchoConditions, stackName)
|
|
45167
45369
|
});
|
|
45168
45370
|
this.logger.info(retainOldOnReplace ? safeMsg`UPDATE not supported for ${logicalId} (${resourceType}), replacing ` + `(CREATE only — UpdateReplacePolicy: Retain keeps the old resource)` : createFirst ? safeMsg`UPDATE not supported for ${logicalId} (${resourceType}), replacing (CREATE → DELETE — the new name differs from the old resource's)` : safeMsg`UPDATE not supported for ${logicalId} (${resourceType}), replacing (DELETE → CREATE)`);
|
|
45169
45371
|
if (retainOldOnReplace) await noteRetainedResource(resourceType, logicalId);
|
|
@@ -45238,7 +45440,7 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45238
45440
|
physicalId: currentResource.physicalId
|
|
45239
45441
|
});
|
|
45240
45442
|
if (nameHeldElsewhere !== void 0) throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement because the ` + `provisioning layer cannot update it in place, but the create collided. ` + safeMsg`${renderNameHeldElsewhere(nameHeldElsewhere)} — so removing ` + "UpdateReplacePolicy: Retain would delete this resource and still collide. Choose a name no other resource holds, or delete the resource holding it if it is yours.", "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
|
|
45241
|
-
const nameOrigin =
|
|
45443
|
+
const nameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
|
|
45242
45444
|
throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement because the ` + "provisioning layer cannot update it in place — but its physical name is still held by the existing resource AND UpdateReplacePolicy: Retain pins that resource in place. " + safeMsg`${nameOrigin.descriptor}. ${nameOrigin.remedy} — with Retain, the old ` + "resource keeps the name, so a same-name replacement can never proceed. Removing UpdateReplacePolicy: Retain lets cdkd delete the old resource first, which destroys it and any data it holds.", "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
|
|
45243
45445
|
}
|
|
45244
45446
|
if (!retainOldOnReplace && !createFirst && createResult.physicalId === currentResource.physicalId && !equalIdNamesDifferentResources({
|
|
@@ -45254,7 +45456,7 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45254
45456
|
oldProperties: currentResource.properties,
|
|
45255
45457
|
newProperties: resolvedProps
|
|
45256
45458
|
})) {
|
|
45257
|
-
const idempotentNameOrigin =
|
|
45459
|
+
const idempotentNameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
|
|
45258
45460
|
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"));
|
|
45259
45461
|
}
|
|
45260
45462
|
this.retainedOldOnReplacement.add(logicalId);
|
|
@@ -45267,6 +45469,7 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45267
45469
|
...createResult.attributes && { attributes: createResult.attributes },
|
|
45268
45470
|
...createResult.noEchoAttributes === true && { noEchoAttributes: true },
|
|
45269
45471
|
...createResult.noEchoAttributeNames && { noEchoAttributeNames: createResult.noEchoAttributeNames },
|
|
45472
|
+
...createResult.secretNamedAttributeNames && { secretNamedAttributeNames: createResult.secretNamedAttributeNames },
|
|
45270
45473
|
...retainedSurvivorReason !== void 0 ? {
|
|
45271
45474
|
outcome: "partial",
|
|
45272
45475
|
reason: retainedSurvivorReason
|
|
@@ -45302,18 +45505,19 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45302
45505
|
...result.noEchoAttributes === true && { noEchoAttributes: true },
|
|
45303
45506
|
...result.noEchoAttributeNames && { noEchoAttributeNames: result.noEchoAttributeNames }
|
|
45304
45507
|
}, updateSecrets, resolvedProps);
|
|
45305
|
-
const recordedProperties =
|
|
45306
|
-
if (result.wasReplaced) this.noEchoExactEchoes.delete(logicalId);
|
|
45508
|
+
const recordedProperties = propertiesToRecord(resolvedProps, result, resourceType, resultProvisionedBy);
|
|
45509
|
+
if (result.wasReplaced) this.noEchoRun.noEchoExactEchoes.delete(logicalId);
|
|
45307
45510
|
stateResources[logicalId] = {
|
|
45308
45511
|
physicalId: result.physicalId,
|
|
45309
45512
|
resourceType,
|
|
45310
45513
|
properties: recordedProperties,
|
|
45311
45514
|
...acceptedCreateOnlyDropsField(recordedProperties, resourceType, resultProvisionedBy, dischargedByReplacement ? "new-resource" : "in-place", currentResource),
|
|
45312
45515
|
...carriedAttributes && { attributes: carriedAttributes },
|
|
45516
|
+
...secretNamedAttributesField(result, result.attributes === void 0 && !result.wasReplaced ? currentResource : void 0),
|
|
45313
45517
|
...!result.wasReplaced && currentResource.noEchoAttributeNames !== void 0 && { noEchoAttributeNames: currentResource.noEchoAttributeNames },
|
|
45314
45518
|
...!result.wasReplaced && currentResource.noEchoExactEchoLeaves !== void 0 && { noEchoExactEchoLeaves: currentResource.noEchoExactEchoLeaves },
|
|
45315
45519
|
...dependencies && dependencies.length > 0 && { dependencies },
|
|
45316
|
-
...
|
|
45520
|
+
...extractTemplateAttributes(template, logicalId),
|
|
45317
45521
|
provisionedBy: resultProvisionedBy,
|
|
45318
45522
|
...keepsParameterRefusal && {
|
|
45319
45523
|
observedBaselineRefused: true,
|
|
@@ -45322,8 +45526,12 @@ async function updateInPlace({ conditions, counts, currentProps, currentPropsAsW
|
|
|
45322
45526
|
};
|
|
45323
45527
|
if (updatePartialReason(result) === void 0) this.recordInlinePolicyWrite(logicalId, "update");
|
|
45324
45528
|
if (keepsParameterRefusal) this.logger.debug(safeMsg`observedProperties capture SKIPPED for updated ${logicalId} (${resourceType}): 'cdkd import' refused its baseline because a template parameter was not provably deployed at its 'Default', and this deploy bound the same 'Default' — an in-place update cannot show that AWS no longer holds the deployed value. The refusal stands until the resource is replaced or re-imported against a CloudFormation stack that proves the parameter.`);
|
|
45325
|
-
const updateCaptureSiblings = keepsParameterRefusal ? void 0 : await
|
|
45326
|
-
|
|
45529
|
+
const updateCaptureSiblings = keepsParameterRefusal ? void 0 : await buildObservedCaptureSiblings({
|
|
45530
|
+
options: this.options,
|
|
45531
|
+
buildResolverContext: (...args) => this.buildResolverContext(...args),
|
|
45532
|
+
resolver: this.resolver
|
|
45533
|
+
}, resourceType, logicalId, result.physicalId, template, stateResources, stackName, parameterValues, conditions);
|
|
45534
|
+
if (!keepsParameterRefusal) this.observedCapture.kickOffObservedCapture(captureProvider, logicalId, result.physicalId, resourceType, resolvedProps, {
|
|
45327
45535
|
...updateCaptureSiblings,
|
|
45328
45536
|
afterOwnWrite: true
|
|
45329
45537
|
}, updateSecrets);
|
|
@@ -45583,11 +45791,11 @@ const NESTED_STACK_ROW_TYPE = "AWS::CloudFormation::Stack";
|
|
|
45583
45791
|
async function provisionResource(logicalId, change, stateResources, stackName, template, parameterValues, conditions, counts, progress) {
|
|
45584
45792
|
const resourceType = change.resourceType;
|
|
45585
45793
|
const renderer = getLiveRenderer();
|
|
45586
|
-
const labelRecreateDirection = this.
|
|
45794
|
+
const labelRecreateDirection = recreateDirectionFor(this.options, stackName, logicalId);
|
|
45587
45795
|
const labelRecordedType = stateResources[logicalId]?.resourceType;
|
|
45588
45796
|
const needsReplacement = change.changeType === "UPDATE" && ((change.propertyChanges?.some((pc) => pc.requiresReplacement && !isReplacementCeiling(pc)) ?? false) || labelRecordedType !== void 0 && labelRecordedType !== resourceType) || labelRecreateDirection !== void 0;
|
|
45589
45797
|
const verb = change.changeType === "CREATE" ? "Creating" : change.changeType === "DELETE" ? "Deleting" : needsReplacement ? "Replacing" : "Updating";
|
|
45590
|
-
const labelRouting = this.
|
|
45798
|
+
const labelRouting = peekRoutingForLabel(this.providerRegistry, this.options, change, stateResources[logicalId], stackName, logicalId, needsReplacement, labelRecreateDirection);
|
|
45591
45799
|
const baseLabel = `${verb} ${logicalId} (${resourceType})${labelRouting === "cc-api" ? " [CC API]" : ""}`;
|
|
45592
45800
|
renderer.addTask(logicalId, baseLabel);
|
|
45593
45801
|
this.liveTaskLabels.set(logicalId, {
|
|
@@ -45719,7 +45927,7 @@ async function provisionResource(logicalId, change, stateResources, stackName, t
|
|
|
45719
45927
|
const shownMessage = this.maskForResource(logicalId, message);
|
|
45720
45928
|
const shownId = safeMsg`${logicalId}`;
|
|
45721
45929
|
this.logger.error(this.maskForResource(logicalId, `Failed to ${change.changeType.toLowerCase()} ${shownId}: ${shownMessage}`));
|
|
45722
|
-
const orphanAdvice = this.
|
|
45930
|
+
const orphanAdvice = orphanedNameCollisionAdvice(this.providerRegistry, change.changeType, logicalId, error);
|
|
45723
45931
|
if (orphanAdvice) this.logger.error(this.maskForResource(logicalId, orphanAdvice));
|
|
45724
45932
|
this.recordEvent({
|
|
45725
45933
|
eventType: "RESOURCE_FAILED",
|
|
@@ -45863,6 +46071,131 @@ var DagExecutor = class {
|
|
|
45863
46071
|
}
|
|
45864
46072
|
};
|
|
45865
46073
|
|
|
46074
|
+
//#endregion
|
|
46075
|
+
//#region src/analyzer/implicit-delete-deps.ts
|
|
46076
|
+
const IMPLICIT_DELETE_DEPENDENCIES = {
|
|
46077
|
+
"AWS::EC2::InternetGateway": ["AWS::EC2::VPCGatewayAttachment", "AWS::EC2::NatGateway"],
|
|
46078
|
+
"AWS::EC2::VPCGatewayAttachment": ["AWS::EC2::NatGateway"],
|
|
46079
|
+
"AWS::Events::EventBus": ["AWS::Events::Rule"],
|
|
46080
|
+
"AWS::Athena::WorkGroup": ["AWS::Athena::NamedQuery"],
|
|
46081
|
+
"AWS::CloudFront::ResponseHeadersPolicy": ["AWS::CloudFront::Distribution"],
|
|
46082
|
+
"AWS::CloudFront::CachePolicy": ["AWS::CloudFront::Distribution"],
|
|
46083
|
+
"AWS::CloudFront::OriginAccessControl": ["AWS::CloudFront::Distribution"],
|
|
46084
|
+
"AWS::EC2::VPC": [
|
|
46085
|
+
"AWS::EC2::Subnet",
|
|
46086
|
+
"AWS::EC2::SecurityGroup",
|
|
46087
|
+
"AWS::EC2::InternetGateway",
|
|
46088
|
+
"AWS::EC2::EgressOnlyInternetGateway",
|
|
46089
|
+
"AWS::EC2::VPCGatewayAttachment",
|
|
46090
|
+
"AWS::EC2::RouteTable"
|
|
46091
|
+
],
|
|
46092
|
+
"AWS::EC2::Subnet": ["AWS::EC2::SubnetRouteTableAssociation", "AWS::Lambda::Function"],
|
|
46093
|
+
"AWS::EC2::RouteTable": ["AWS::EC2::Route", "AWS::EC2::SubnetRouteTableAssociation"],
|
|
46094
|
+
"AWS::EC2::SecurityGroup": [
|
|
46095
|
+
"AWS::EC2::SecurityGroupIngress",
|
|
46096
|
+
"AWS::EC2::SecurityGroupEgress",
|
|
46097
|
+
"AWS::Lambda::Function"
|
|
46098
|
+
]
|
|
46099
|
+
};
|
|
46100
|
+
const ALARM_RULE_FUNCTION_REGEX = /\b(?:ALARM|OK|INSUFFICIENT_DATA)\s*\(\s*([^)]*?)\s*\)/gi;
|
|
46101
|
+
function extractReferencedAlarmNames(alarmRule) {
|
|
46102
|
+
const names = /* @__PURE__ */ new Set();
|
|
46103
|
+
for (const match of alarmRule.matchAll(ALARM_RULE_FUNCTION_REGEX)) {
|
|
46104
|
+
let arg = (match[1] ?? "").trim();
|
|
46105
|
+
if (arg.length === 0) continue;
|
|
46106
|
+
if (arg.startsWith("\"") && arg.endsWith("\"") || arg.startsWith("'") && arg.endsWith("'")) arg = arg.slice(1, -1);
|
|
46107
|
+
if (arg.length === 0) continue;
|
|
46108
|
+
const arnAlarmMatch = /:alarm:(.+)$/.exec(arg);
|
|
46109
|
+
if (arnAlarmMatch?.[1]) names.add(arnAlarmMatch[1]);
|
|
46110
|
+
else names.add(arg);
|
|
46111
|
+
}
|
|
46112
|
+
return [...names];
|
|
46113
|
+
}
|
|
46114
|
+
function computeImplicitDeleteEdges(resources) {
|
|
46115
|
+
const edges = [];
|
|
46116
|
+
const alarmTypes = /* @__PURE__ */ new Set(["AWS::CloudWatch::Alarm", "AWS::CloudWatch::CompositeAlarm"]);
|
|
46117
|
+
const nameToLogicalId = /* @__PURE__ */ new Map();
|
|
46118
|
+
for (const [logicalId, resource] of Object.entries(resources)) {
|
|
46119
|
+
if (!alarmTypes.has(resource.resourceType)) continue;
|
|
46120
|
+
const alarmName = typeof resource.properties?.["AlarmName"] === "string" ? resource.properties["AlarmName"] : resource.physicalId;
|
|
46121
|
+
if (alarmName) nameToLogicalId.set(alarmName, logicalId);
|
|
46122
|
+
}
|
|
46123
|
+
for (const [logicalId, resource] of Object.entries(resources)) {
|
|
46124
|
+
if (resource.resourceType !== "AWS::CloudWatch::CompositeAlarm") continue;
|
|
46125
|
+
const alarmRule = resource.properties?.["AlarmRule"];
|
|
46126
|
+
if (typeof alarmRule !== "string") continue;
|
|
46127
|
+
for (const referencedName of extractReferencedAlarmNames(alarmRule)) {
|
|
46128
|
+
const referencedLogicalId = nameToLogicalId.get(referencedName);
|
|
46129
|
+
if (!referencedLogicalId || referencedLogicalId === logicalId) continue;
|
|
46130
|
+
edges.push({
|
|
46131
|
+
before: logicalId,
|
|
46132
|
+
after: referencedLogicalId
|
|
46133
|
+
});
|
|
46134
|
+
}
|
|
46135
|
+
}
|
|
46136
|
+
return edges;
|
|
46137
|
+
}
|
|
46138
|
+
|
|
46139
|
+
//#endregion
|
|
46140
|
+
//#region src/deployment/deploy-engine/dependencies.ts
|
|
46141
|
+
function hasPending(executor) {
|
|
46142
|
+
for (const node of executor.values()) if (node.state === "pending") return true;
|
|
46143
|
+
return false;
|
|
46144
|
+
}
|
|
46145
|
+
function buildDeletionDependencies(deleteIds, state, logger) {
|
|
46146
|
+
const dependedBy = /* @__PURE__ */ new Map();
|
|
46147
|
+
for (const id of deleteIds) dependedBy.set(id, /* @__PURE__ */ new Set());
|
|
46148
|
+
for (const id of deleteIds) {
|
|
46149
|
+
const resource = state.resources[id];
|
|
46150
|
+
if (!resource?.dependencies) continue;
|
|
46151
|
+
for (const dep of resource.dependencies) {
|
|
46152
|
+
if (!deleteIds.has(dep)) continue;
|
|
46153
|
+
dependedBy.get(dep).add(id);
|
|
46154
|
+
}
|
|
46155
|
+
}
|
|
46156
|
+
addImplicitDeleteDependencies(deleteIds, state, dependedBy, logger);
|
|
46157
|
+
return dependedBy;
|
|
46158
|
+
}
|
|
46159
|
+
function addImplicitDeleteDependencies(deleteIds, state, dependedBy, logger) {
|
|
46160
|
+
const typeToIds = /* @__PURE__ */ new Map();
|
|
46161
|
+
for (const id of deleteIds) {
|
|
46162
|
+
const resource = state.resources[id];
|
|
46163
|
+
if (!resource) continue;
|
|
46164
|
+
const ids = typeToIds.get(resource.resourceType) ?? [];
|
|
46165
|
+
ids.push(id);
|
|
46166
|
+
typeToIds.set(resource.resourceType, ids);
|
|
46167
|
+
}
|
|
46168
|
+
for (const id of deleteIds) {
|
|
46169
|
+
const resource = state.resources[id];
|
|
46170
|
+
if (!resource) continue;
|
|
46171
|
+
const mustDeleteAfter = IMPLICIT_DELETE_DEPENDENCIES[resource.resourceType];
|
|
46172
|
+
if (!mustDeleteAfter) continue;
|
|
46173
|
+
for (const depType of mustDeleteAfter) {
|
|
46174
|
+
const depIds = typeToIds.get(depType);
|
|
46175
|
+
if (!depIds) continue;
|
|
46176
|
+
for (const depId of depIds) {
|
|
46177
|
+
if (!dependedBy.has(id)) dependedBy.set(id, /* @__PURE__ */ new Set());
|
|
46178
|
+
if (!dependedBy.get(id).has(depId)) {
|
|
46179
|
+
dependedBy.get(id).add(depId);
|
|
46180
|
+
logger.debug(safeMsg`Implicit delete dependency: ${depId} (${depType}) must be deleted before ${id} (${resource.resourceType})`);
|
|
46181
|
+
}
|
|
46182
|
+
}
|
|
46183
|
+
}
|
|
46184
|
+
}
|
|
46185
|
+
const scoped = {};
|
|
46186
|
+
for (const id of deleteIds) {
|
|
46187
|
+
const resource = state.resources[id];
|
|
46188
|
+
if (resource) scoped[id] = resource;
|
|
46189
|
+
}
|
|
46190
|
+
for (const { before, after } of computeImplicitDeleteEdges(scoped)) {
|
|
46191
|
+
if (!dependedBy.has(after)) dependedBy.set(after, /* @__PURE__ */ new Set());
|
|
46192
|
+
if (!dependedBy.get(after).has(before)) {
|
|
46193
|
+
dependedBy.get(after).add(before);
|
|
46194
|
+
logger.debug(safeMsg`Implicit delete dependency: ${before} (${scoped[before]?.resourceType}) must be deleted before ${after} (${scoped[after]?.resourceType})`);
|
|
46195
|
+
}
|
|
46196
|
+
}
|
|
46197
|
+
}
|
|
46198
|
+
|
|
45866
46199
|
//#endregion
|
|
45867
46200
|
//#region src/deployment/deploy-engine/execute.ts
|
|
45868
46201
|
const NO_REPLACEMENT_ORPHAN_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -46038,13 +46371,13 @@ async function executeDeployment(template, currentState, changes, dag, execution
|
|
|
46038
46371
|
provisionedBy: createdId !== void 0 ? "sdk" : pendingRequest !== void 0 ? "cc-api" : newResources[logicalId]?.provisionedBy ?? previousState?.provisionedBy,
|
|
46039
46372
|
...pendingRequest !== void 0 && {
|
|
46040
46373
|
pendingCloudControlRequest: pendingRequest,
|
|
46041
|
-
deletionPolicy: journaledOrphanPolicy(
|
|
46374
|
+
deletionPolicy: journaledOrphanPolicy(extractTemplateAttributes(template, logicalId).deletionPolicy)
|
|
46042
46375
|
},
|
|
46043
46376
|
...previousState && { previousState },
|
|
46044
46377
|
physicalId: createdId ?? statePhysicalId,
|
|
46045
46378
|
...createdId !== void 0 && {
|
|
46046
46379
|
physicalIdRecoveredFromError: true,
|
|
46047
|
-
deletionPolicy: journaledOrphanPolicy(
|
|
46380
|
+
deletionPolicy: journaledOrphanPolicy(extractTemplateAttributes(template, logicalId).deletionPolicy)
|
|
46048
46381
|
},
|
|
46049
46382
|
...change.changeType === "UPDATE" && this.oldDeletedBeforeCreate.has(logicalId) && { oldDeletedBeforeCreate: true },
|
|
46050
46383
|
...orphanedBy !== void 0 && { replacementOrphaned: this.oldDeletedBeforeCreate.has(logicalId) ? "delete-first" : "create-first" },
|
|
@@ -46060,7 +46393,7 @@ async function executeDeployment(template, currentState, changes, dag, execution
|
|
|
46060
46393
|
provisionedBy: "sdk",
|
|
46061
46394
|
physicalId: orphanedBy.createdId,
|
|
46062
46395
|
physicalIdRecoveredFromError: true,
|
|
46063
|
-
deletionPolicy: journaledOrphanPolicy(
|
|
46396
|
+
deletionPolicy: journaledOrphanPolicy(extractTemplateAttributes(template, logicalId).deletionPolicy),
|
|
46064
46397
|
replacedPhysicalId: orphanedBy.record.physicalId,
|
|
46065
46398
|
replacedResourceType: orphanedBy.record.resourceType,
|
|
46066
46399
|
...this.oldDeletedBeforeCreate.has(logicalId) && { replacedResourceDeleted: true },
|
|
@@ -46107,11 +46440,11 @@ async function executeDeployment(template, currentState, changes, dag, execution
|
|
|
46107
46440
|
} finally {
|
|
46108
46441
|
await saveChain;
|
|
46109
46442
|
}
|
|
46110
|
-
if (this.interrupted &&
|
|
46443
|
+
if (this.interrupted && hasPending(createUpdateExecutor)) throw new InterruptedError(this.interruptCause ?? "user");
|
|
46111
46444
|
}
|
|
46112
46445
|
if (deleteChanges.size > 0) {
|
|
46113
46446
|
this.logger.info(safeMsg`${red("Deleting")} ${red(deleteChanges.size)} resource(s)`);
|
|
46114
|
-
const deleteDeps =
|
|
46447
|
+
const deleteDeps = buildDeletionDependencies(deleteChanges, currentState, this.logger);
|
|
46115
46448
|
const deleteExecutor = new DagExecutor();
|
|
46116
46449
|
for (const id of deleteChanges) deleteExecutor.add({
|
|
46117
46450
|
id,
|
|
@@ -46153,7 +46486,7 @@ async function executeDeployment(template, currentState, changes, dag, execution
|
|
|
46153
46486
|
} finally {
|
|
46154
46487
|
await saveChain;
|
|
46155
46488
|
}
|
|
46156
|
-
if (this.interrupted &&
|
|
46489
|
+
if (this.interrupted && hasPending(deleteExecutor)) throw new InterruptedError(this.interruptCause ?? "user");
|
|
46157
46490
|
}
|
|
46158
46491
|
if (this.interrupted) this.warnUnretriedReplacedDeletes("interrupted");
|
|
46159
46492
|
else try {
|
|
@@ -46317,7 +46650,7 @@ async function executeDeployment(template, currentState, changes, dag, execution
|
|
|
46317
46650
|
}
|
|
46318
46651
|
let outputs;
|
|
46319
46652
|
try {
|
|
46320
|
-
outputs = await withSharedDrainBudget(() => this.
|
|
46653
|
+
outputs = await withSharedDrainBudget(() => resolveOutputs(this.outputsRun, this.outputsDeps(), template, newResources, stackName, outputsDigestSource, parameterValues, conditions));
|
|
46321
46654
|
const resolvedOutputsBeforeRedaction = outputs;
|
|
46322
46655
|
outputs = this.redactOutputs(outputs);
|
|
46323
46656
|
this.rememberRecoverableMaskedOutputs(stackName, resolvedOutputsBeforeRedaction, outputs);
|
|
@@ -46334,8 +46667,8 @@ async function executeDeployment(template, currentState, changes, dag, execution
|
|
|
46334
46667
|
resources: newResources,
|
|
46335
46668
|
...orphansCarriedFrom(currentState),
|
|
46336
46669
|
outputs,
|
|
46337
|
-
exportNames: [...this.resolvedExportNames],
|
|
46338
|
-
...this.skippedOutputs && { skippedOutputs: { ...this.skippedOutputs } },
|
|
46670
|
+
exportNames: [...this.outputsRun.resolvedExportNames],
|
|
46671
|
+
...this.outputsRun.skippedOutputs && { skippedOutputs: { ...this.outputsRun.skippedOutputs } },
|
|
46339
46672
|
...this.recordedImports.length > 0 && { imports: [...this.recordedImports] },
|
|
46340
46673
|
...this.recordedOutputReads.length > 0 && { outputReads: [...this.recordedOutputReads] },
|
|
46341
46674
|
lastModified: Date.now()
|
|
@@ -47800,8 +48133,8 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47800
48133
|
}]).command}`);
|
|
47801
48134
|
}
|
|
47802
48135
|
} catch {}
|
|
47803
|
-
this.
|
|
47804
|
-
this.kickOffAutoRefreshObservedProperties(currentState.resources, currentState);
|
|
48136
|
+
stampReasonlessParameterRefusals(this.logger, currentState.resources, template);
|
|
48137
|
+
this.observedCapture.kickOffAutoRefreshObservedProperties(currentState.resources, currentState);
|
|
47805
48138
|
this.logger.debug(safeMsg`Template has ${Object.keys(template.Resources || {}).length} resources`);
|
|
47806
48139
|
const outputsDigestSource = structuredClone({
|
|
47807
48140
|
...template,
|
|
@@ -47810,7 +48143,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47810
48143
|
const parameterValues = await this.resolver.resolveParameters(template, this.options.parameters, { ...this.options.inheritedSecrets && hasMaskableValues(this.options.inheritedSecrets) && { inheritedSecrets: this.options.inheritedSecrets } });
|
|
47811
48144
|
this.logger.debug(safeMsg`Resolved ${Object.keys(parameterValues).length} parameters: ${Object.keys(parameterValues).join(", ")}`);
|
|
47812
48145
|
poisonRenderedSpellingsCollidingIn(template, parameterValues, this.options.inheritedSecrets);
|
|
47813
|
-
this.inheritedNoEchoParameters = /* @__PURE__ */ new Set([...this.freshNoEchoParameters(parameterValues) ?? [], ...this.options.passedNoEchoParameters ?? []]);
|
|
48146
|
+
this.noEchoRun.inheritedNoEchoParameters = /* @__PURE__ */ new Set([...this.freshNoEchoParameters(parameterValues) ?? [], ...this.options.passedNoEchoParameters ?? []]);
|
|
47814
48147
|
const backfillNoEchoValues = noEchoParameterValueSeed(template.Parameters, parameterValues, this.options.inheritedSecrets, this.options.parameters);
|
|
47815
48148
|
this.fingerprintNoEchoValues = backfillNoEchoValues;
|
|
47816
48149
|
this.fingerprintParameters = parameterInputsFor({
|
|
@@ -47841,14 +48174,15 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47841
48174
|
}));
|
|
47842
48175
|
}
|
|
47843
48176
|
const effectiveTemplate = this.templateParser.filterResourcesByCondition(template, conditions);
|
|
47844
|
-
this.constructPathTemplate = effectiveTemplate;
|
|
47845
|
-
this.noEchoConditions = conditions;
|
|
47846
|
-
this.
|
|
48177
|
+
this.noEchoRun.constructPathTemplate = effectiveTemplate;
|
|
48178
|
+
this.noEchoRun.noEchoConditions = conditions;
|
|
48179
|
+
seedPersistedNoEchoAttributes(this.noEchoRun, currentState.resources);
|
|
47847
48180
|
const orphanCountBeforeAdoption = (currentState.orphans ?? []).length;
|
|
47848
48181
|
const orphanPlan = await this.adoptRollbackOrphans(currentState, effectiveTemplate);
|
|
47849
|
-
this.
|
|
48182
|
+
this.captureStoredNoEchoNamingValues(currentState.resources, effectiveTemplate, conditions);
|
|
48183
|
+
this.preDeploySecretNamedRecords = secretNamedRecordNeedles(currentState.resources, this.stateNamingSecrets());
|
|
47850
48184
|
if (Object.keys(orphanPlan.adopted).length > 0) {
|
|
47851
|
-
this.
|
|
48185
|
+
stampReasonlessParameterRefusals(this.logger, currentState.resources, template);
|
|
47852
48186
|
if (backfillMaskedPropertyFingerprints(currentState.resources, template, backfillNoEchoValues) > 0) maskedFingerprintsBackfilled = true;
|
|
47853
48187
|
}
|
|
47854
48188
|
const orphansChanged = Object.keys(orphanPlan.adopted).length > 0 || (currentState.orphans ?? []).length !== orphanCountBeforeAdoption;
|
|
@@ -47883,7 +48217,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47883
48217
|
sources: maskedInputSourcesForDiff,
|
|
47884
48218
|
rebaselined: /* @__PURE__ */ new Map()
|
|
47885
48219
|
};
|
|
47886
|
-
const changes = await this.diffCalculator.calculateDiff(currentState, effectiveTemplate, diffResolveFn, makeCanonicalizePropertiesFn(this.providerRegistry), this.providerRegistry.getAllowedUnsupportedProperties?.(), freshNoEchoParametersWithDeclared(this.inheritedNoEchoParameters, effectiveTemplate), this.diffLogMasker(diffResolverContext.recordedSecretValues, effectiveTemplate, parameterValues, currentState.resources), recreateTargetIdsFor(this.options.recreateTargets, stackName), maskedInputs, this.options.refusalRecovery, this.
|
|
48220
|
+
const changes = await this.diffCalculator.calculateDiff(currentState, effectiveTemplate, diffResolveFn, makeCanonicalizePropertiesFn(this.providerRegistry), this.providerRegistry.getAllowedUnsupportedProperties?.(), freshNoEchoParametersWithDeclared(this.noEchoRun.inheritedNoEchoParameters, effectiveTemplate), this.diffLogMasker(diffResolverContext.recordedSecretValues, effectiveTemplate, parameterValues, currentState.resources), recreateTargetIdsFor(this.options.recreateTargets, stackName), maskedInputs, this.options.refusalRecovery, noEchoDiffComparison(this.noEchoRun, this.noEchoDeps(), currentState.resources, effectiveTemplate, conditions, parameterValues, stackName), {
|
|
47887
48221
|
...this.options.inheritedReferenceProvenance && { inherited: this.options.inheritedReferenceProvenance },
|
|
47888
48222
|
crossStackOutputs: crossStackOutputProvenanceSource(crossStackReads, this.recordedImports, this.stateBackend)
|
|
47889
48223
|
});
|
|
@@ -47926,7 +48260,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47926
48260
|
}
|
|
47927
48261
|
const startProvenanceCapture = () => {
|
|
47928
48262
|
if (this.options.dryRun || isKnownTokenFreeState(currentStateData?.state)) return;
|
|
47929
|
-
this.kickOffProvenanceCapture({
|
|
48263
|
+
this.provenanceCapture.kickOffProvenanceCapture({
|
|
47930
48264
|
noChange: this.diffCalculator.filterByType(changes, "NO_CHANGE").map((change) => change.logicalId),
|
|
47931
48265
|
resources: currentState.resources,
|
|
47932
48266
|
template: effectiveTemplate,
|
|
@@ -47940,8 +48274,8 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47940
48274
|
startProvenanceCapture();
|
|
47941
48275
|
let persistedOutputs = currentState.outputs ?? {};
|
|
47942
48276
|
if (!this.options.dryRun) {
|
|
47943
|
-
const resolvedOutputs = this.redactOutputs(await withSharedDrainBudget(() => this.
|
|
47944
|
-
const observedRefresh = await this.drainObservedCaptures(currentState.resources) > 0;
|
|
48277
|
+
const resolvedOutputs = this.redactOutputs(await withSharedDrainBudget(() => resolveOutputs(this.outputsRun, this.outputsDeps(), effectiveTemplate, currentState.resources, stackName, outputsDigestSource, parameterValues, conditions)));
|
|
48278
|
+
const observedRefresh = await this.observedCapture.drainObservedCaptures(currentState.resources) > 0;
|
|
47945
48279
|
const resolutionFailed = Object.values(resolvedOutputs).some((v) => v === void 0);
|
|
47946
48280
|
const currentEffectiveExports = new Set(importableOutputKeys(currentState));
|
|
47947
48281
|
let merge = resolutionFailed ? mergeNoChangeOutputs({
|
|
@@ -47949,26 +48283,26 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47949
48283
|
resolved: resolvedOutputs,
|
|
47950
48284
|
declaredOutputs: effectiveTemplate.Outputs,
|
|
47951
48285
|
previousExportNames: currentEffectiveExports,
|
|
47952
|
-
resolvedExportNames: this.resolvedExportNames,
|
|
47953
|
-
refusesCarriedAlias: (outputKey, exportName) => this.carriedExportAliasRefusal === void 0 ? "An export alias was not carried: no export-name verdict is available." : this.carriedExportAliasRefusal(outputKey, exportName)
|
|
48286
|
+
resolvedExportNames: this.outputsRun.resolvedExportNames,
|
|
48287
|
+
refusesCarriedAlias: (outputKey, exportName) => this.outputsRun.carriedExportAliasRefusal === void 0 ? "An export alias was not carried: no export-name verdict is available." : this.outputsRun.carriedExportAliasRefusal(outputKey, exportName)
|
|
47954
48288
|
}) : void 0;
|
|
47955
48289
|
if (merge?.kind === "merged") {
|
|
47956
|
-
for (const key of merge.carriedKeys) Reflect.deleteProperty(this.outputsTemplateSource, key);
|
|
48290
|
+
for (const key of merge.carriedKeys) Reflect.deleteProperty(this.outputsRun.outputsTemplateSource, key);
|
|
47957
48291
|
if (merge.carriedKeys.length > 0 && !bagHoldsSecretExpression(persistedOutputs) && bagHoldsSecretExpression(this.redactOutputs(merge.outputs))) merge = {
|
|
47958
48292
|
kind: "kept",
|
|
47959
48293
|
reason: "mixed-generation"
|
|
47960
48294
|
};
|
|
47961
48295
|
}
|
|
47962
|
-
if (merge?.kind === "kept") this.outputsSourceUsable = false;
|
|
48296
|
+
if (merge?.kind === "kept") this.outputsRun.outputsSourceUsable = false;
|
|
47963
48297
|
if (merge?.kind === "merged") for (const { reason } of merge.refusedAliases) this.logger.warn(reason);
|
|
47964
48298
|
const outputsToPersist = merge === void 0 ? resolvedOutputs : merge.kind === "merged" ? merge.outputs : persistedOutputs;
|
|
47965
|
-
const exportNamesToPersist = merge === void 0 ? this.resolvedExportNames : merge.kind === "merged" ? merge.exportNames : void 0;
|
|
48299
|
+
const exportNamesToPersist = merge === void 0 ? this.outputsRun.resolvedExportNames : merge.kind === "merged" ? merge.exportNames : void 0;
|
|
47966
48300
|
const outputsChanged = !outputMapsEqual(persistedOutputs, outputsToPersist);
|
|
47967
48301
|
const persistExportSet = new Set(exportNamesToPersist ?? []);
|
|
47968
48302
|
const exportSetChanged = exportNamesToPersist !== void 0 && (currentEffectiveExports.size !== persistExportSet.size || [...persistExportSet].some((k) => !currentEffectiveExports.has(k)));
|
|
47969
48303
|
if (merge?.kind === "kept" && !outputMapsEqual(persistedOutputs, resolvedOutputs)) this.logger.warn(safeMsg`Outputs changed but one or more could not be resolved; keeping the previously persisted outputs. ${keptWholeReasonText(merge.reason)} ` + "A downstream Fn::ImportValue may fail until the next deploy.");
|
|
47970
48304
|
else if (merge?.kind === "merged" && merge.carriedKeys.length > 0) this.logger.debug(safeMsg`Kept the previously persisted value of ${merge.carriedKeys.length} output key(s), ` + "carried export aliases included, that could not be resolved (no-change path)");
|
|
47971
|
-
const skippedOutputsChanged = !skippedOutputsEqual(currentState.skippedOutputs, this.skippedOutputs);
|
|
48305
|
+
const skippedOutputsChanged = !skippedOutputsEqual(currentState.skippedOutputs, this.outputsRun.skippedOutputs);
|
|
47972
48306
|
const healedAttributesPending = this.attributeHealer.hasUnpersistedHeals(currentState.resources);
|
|
47973
48307
|
const conditionVerdictsChanged = !conditionVerdictRecordsEqual(readRecordedConditionVerdicts(currentState), conditionVerdicts);
|
|
47974
48308
|
if (outputsChanged || exportSetChanged && currentState.exportNames !== void 0) await requireOutputsOnlyApproval({
|
|
@@ -47985,7 +48319,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
47985
48319
|
...orphansCarriedFrom(currentState),
|
|
47986
48320
|
outputs: outputsChanged ? outputsToPersist : persistedOutputs,
|
|
47987
48321
|
...exportNamesToPersist === void 0 ? exportNamesCarriedFrom(currentState) : { exportNames: [...exportNamesToPersist] },
|
|
47988
|
-
...this.skippedOutputs && { skippedOutputs: { ...this.skippedOutputs } },
|
|
48322
|
+
...this.outputsRun.skippedOutputs && { skippedOutputs: { ...this.outputsRun.skippedOutputs } },
|
|
47989
48323
|
...crossStackReadsForPartialSave(currentState, this.recordedImports, this.recordedOutputReads, this.crossStackReadKeyNormalizer()),
|
|
47990
48324
|
...conditionVerdicts && { conditionVerdicts },
|
|
47991
48325
|
lastModified: Date.now()
|
|
@@ -48018,7 +48352,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
48018
48352
|
updatePartial: 0,
|
|
48019
48353
|
unchanged: Object.keys(currentState.resources).length,
|
|
48020
48354
|
durationMs: Date.now() - startTime,
|
|
48021
|
-
outputs:
|
|
48355
|
+
outputs: buildDisplayOutputs(template, this.redactOutputs(persistedOutputs)),
|
|
48022
48356
|
attributeFallbackCount: this.resolver.getPhysicalIdFallbackCount()
|
|
48023
48357
|
};
|
|
48024
48358
|
}
|
|
@@ -48099,7 +48433,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
48099
48433
|
try {
|
|
48100
48434
|
this.stateBackend.warmConnections(stackName, this.stackRegion, TAIL_WARM_CONNECTIONS);
|
|
48101
48435
|
} catch {}
|
|
48102
|
-
await this.drainObservedCaptures(newState.resources);
|
|
48436
|
+
await this.observedCapture.drainObservedCaptures(newState.resources);
|
|
48103
48437
|
const [newEtag] = await Promise.all([this.stateBackend.saveState(stackName, this.stackRegion, this.withParentInfo(conditionVerdicts ? {
|
|
48104
48438
|
...newState,
|
|
48105
48439
|
conditionVerdicts
|
|
@@ -48136,7 +48470,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
48136
48470
|
...(actualCounts.crossPrefixKept ?? 0) > 0 && { crossPrefixKept: actualCounts.crossPrefixKept },
|
|
48137
48471
|
unchanged: unchangedCount,
|
|
48138
48472
|
durationMs,
|
|
48139
|
-
outputs:
|
|
48473
|
+
outputs: buildDisplayOutputs(template, this.redactOutputs(newState.outputs ?? {})),
|
|
48140
48474
|
attributeFallbackCount: this.resolver.getPhysicalIdFallbackCount()
|
|
48141
48475
|
};
|
|
48142
48476
|
} catch (error) {
|
|
@@ -48148,7 +48482,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
48148
48482
|
renderer.stop();
|
|
48149
48483
|
} catch {}
|
|
48150
48484
|
process.removeListener("SIGINT", sigintHandler);
|
|
48151
|
-
this.observedCaptureTasks.clear();
|
|
48485
|
+
this.observedCapture.observedCaptureTasks.clear();
|
|
48152
48486
|
try {
|
|
48153
48487
|
await flushKeptForReadoption(this);
|
|
48154
48488
|
await this.generatedNameGuard?.settle();
|
|
@@ -48170,175 +48504,6 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
48170
48504
|
}
|
|
48171
48505
|
}
|
|
48172
48506
|
|
|
48173
|
-
//#endregion
|
|
48174
|
-
//#region src/deployment/label-routing.ts
|
|
48175
|
-
function deriveLabelRouting(change, existingState, registry, forceCcApi = false) {
|
|
48176
|
-
try {
|
|
48177
|
-
if (change.changeType === "DELETE") return existingState?.provisionedBy;
|
|
48178
|
-
return registry.getProviderFor({
|
|
48179
|
-
resourceType: change.resourceType,
|
|
48180
|
-
properties: change.desiredProperties ?? {},
|
|
48181
|
-
provisionedBy: existingState?.provisionedBy,
|
|
48182
|
-
previousProperties: existingState?.properties,
|
|
48183
|
-
forceCcApi
|
|
48184
|
-
}).provisionedBy;
|
|
48185
|
-
} catch {
|
|
48186
|
-
return;
|
|
48187
|
-
}
|
|
48188
|
-
}
|
|
48189
|
-
|
|
48190
|
-
//#endregion
|
|
48191
|
-
//#region src/deployment/deploy-engine/routing.ts
|
|
48192
|
-
function isPinnedToCcApi(stackName, logicalId) {
|
|
48193
|
-
return this.options.pinCcApi?.stackName === stackName && this.options.pinCcApi.logicalIds.has(logicalId);
|
|
48194
|
-
}
|
|
48195
|
-
function recreateDirectionFor(stackName, logicalId) {
|
|
48196
|
-
const targets = this.options.recreateTargets?.stackName === stackName ? this.options.recreateTargets : void 0;
|
|
48197
|
-
if (targets === void 0) return void 0;
|
|
48198
|
-
if (targets.viaCcApi.has(logicalId)) return "cc-api";
|
|
48199
|
-
if (targets.viaSdkProvider.has(logicalId)) return "sdk";
|
|
48200
|
-
}
|
|
48201
|
-
function peekRoutingForLabel(change, existingState, stackName, logicalId, needsReplacement = false, recreateDirection) {
|
|
48202
|
-
if (needsReplacement) {
|
|
48203
|
-
const hintRecord = {
|
|
48204
|
-
...recreateDirection !== void 0 && { provisionedBy: recreateDirection },
|
|
48205
|
-
...existingState?.properties !== void 0 && { properties: existingState.properties }
|
|
48206
|
-
};
|
|
48207
|
-
return deriveLabelRouting(change, hintRecord, this.providerRegistry, recreateDirection === "cc-api");
|
|
48208
|
-
}
|
|
48209
|
-
return deriveLabelRouting(change, existingState, this.providerRegistry, this.isPinnedToCcApi(stackName, logicalId));
|
|
48210
|
-
}
|
|
48211
|
-
function preparePropertiesForCcApi(resourceType, resolvedProps, logicalId) {
|
|
48212
|
-
const sdkProvider = this.providerRegistry.getRegisteredTypes().includes(resourceType) ? this.providerRegistry.getProvider(resourceType) : void 0;
|
|
48213
|
-
if (sdkProvider?.preparePropertiesForFallback) return sdkProvider.preparePropertiesForFallback(logicalId, resourceType, resolvedProps);
|
|
48214
|
-
return applyDefaultNameForFallback(logicalId, resourceType, resolvedProps);
|
|
48215
|
-
}
|
|
48216
|
-
|
|
48217
|
-
//#endregion
|
|
48218
|
-
//#region src/analyzer/implicit-delete-deps.ts
|
|
48219
|
-
const IMPLICIT_DELETE_DEPENDENCIES = {
|
|
48220
|
-
"AWS::EC2::InternetGateway": ["AWS::EC2::VPCGatewayAttachment", "AWS::EC2::NatGateway"],
|
|
48221
|
-
"AWS::EC2::VPCGatewayAttachment": ["AWS::EC2::NatGateway"],
|
|
48222
|
-
"AWS::Events::EventBus": ["AWS::Events::Rule"],
|
|
48223
|
-
"AWS::Athena::WorkGroup": ["AWS::Athena::NamedQuery"],
|
|
48224
|
-
"AWS::CloudFront::ResponseHeadersPolicy": ["AWS::CloudFront::Distribution"],
|
|
48225
|
-
"AWS::CloudFront::CachePolicy": ["AWS::CloudFront::Distribution"],
|
|
48226
|
-
"AWS::CloudFront::OriginAccessControl": ["AWS::CloudFront::Distribution"],
|
|
48227
|
-
"AWS::EC2::VPC": [
|
|
48228
|
-
"AWS::EC2::Subnet",
|
|
48229
|
-
"AWS::EC2::SecurityGroup",
|
|
48230
|
-
"AWS::EC2::InternetGateway",
|
|
48231
|
-
"AWS::EC2::EgressOnlyInternetGateway",
|
|
48232
|
-
"AWS::EC2::VPCGatewayAttachment",
|
|
48233
|
-
"AWS::EC2::RouteTable"
|
|
48234
|
-
],
|
|
48235
|
-
"AWS::EC2::Subnet": ["AWS::EC2::SubnetRouteTableAssociation", "AWS::Lambda::Function"],
|
|
48236
|
-
"AWS::EC2::RouteTable": ["AWS::EC2::Route", "AWS::EC2::SubnetRouteTableAssociation"],
|
|
48237
|
-
"AWS::EC2::SecurityGroup": [
|
|
48238
|
-
"AWS::EC2::SecurityGroupIngress",
|
|
48239
|
-
"AWS::EC2::SecurityGroupEgress",
|
|
48240
|
-
"AWS::Lambda::Function"
|
|
48241
|
-
]
|
|
48242
|
-
};
|
|
48243
|
-
const ALARM_RULE_FUNCTION_REGEX = /\b(?:ALARM|OK|INSUFFICIENT_DATA)\s*\(\s*([^)]*?)\s*\)/gi;
|
|
48244
|
-
function extractReferencedAlarmNames(alarmRule) {
|
|
48245
|
-
const names = /* @__PURE__ */ new Set();
|
|
48246
|
-
for (const match of alarmRule.matchAll(ALARM_RULE_FUNCTION_REGEX)) {
|
|
48247
|
-
let arg = (match[1] ?? "").trim();
|
|
48248
|
-
if (arg.length === 0) continue;
|
|
48249
|
-
if (arg.startsWith("\"") && arg.endsWith("\"") || arg.startsWith("'") && arg.endsWith("'")) arg = arg.slice(1, -1);
|
|
48250
|
-
if (arg.length === 0) continue;
|
|
48251
|
-
const arnAlarmMatch = /:alarm:(.+)$/.exec(arg);
|
|
48252
|
-
if (arnAlarmMatch?.[1]) names.add(arnAlarmMatch[1]);
|
|
48253
|
-
else names.add(arg);
|
|
48254
|
-
}
|
|
48255
|
-
return [...names];
|
|
48256
|
-
}
|
|
48257
|
-
function computeImplicitDeleteEdges(resources) {
|
|
48258
|
-
const edges = [];
|
|
48259
|
-
const alarmTypes = /* @__PURE__ */ new Set(["AWS::CloudWatch::Alarm", "AWS::CloudWatch::CompositeAlarm"]);
|
|
48260
|
-
const nameToLogicalId = /* @__PURE__ */ new Map();
|
|
48261
|
-
for (const [logicalId, resource] of Object.entries(resources)) {
|
|
48262
|
-
if (!alarmTypes.has(resource.resourceType)) continue;
|
|
48263
|
-
const alarmName = typeof resource.properties?.["AlarmName"] === "string" ? resource.properties["AlarmName"] : resource.physicalId;
|
|
48264
|
-
if (alarmName) nameToLogicalId.set(alarmName, logicalId);
|
|
48265
|
-
}
|
|
48266
|
-
for (const [logicalId, resource] of Object.entries(resources)) {
|
|
48267
|
-
if (resource.resourceType !== "AWS::CloudWatch::CompositeAlarm") continue;
|
|
48268
|
-
const alarmRule = resource.properties?.["AlarmRule"];
|
|
48269
|
-
if (typeof alarmRule !== "string") continue;
|
|
48270
|
-
for (const referencedName of extractReferencedAlarmNames(alarmRule)) {
|
|
48271
|
-
const referencedLogicalId = nameToLogicalId.get(referencedName);
|
|
48272
|
-
if (!referencedLogicalId || referencedLogicalId === logicalId) continue;
|
|
48273
|
-
edges.push({
|
|
48274
|
-
before: logicalId,
|
|
48275
|
-
after: referencedLogicalId
|
|
48276
|
-
});
|
|
48277
|
-
}
|
|
48278
|
-
}
|
|
48279
|
-
return edges;
|
|
48280
|
-
}
|
|
48281
|
-
|
|
48282
|
-
//#endregion
|
|
48283
|
-
//#region src/deployment/deploy-engine/dependencies.ts
|
|
48284
|
-
function hasPending(executor) {
|
|
48285
|
-
for (const node of executor.values()) if (node.state === "pending") return true;
|
|
48286
|
-
return false;
|
|
48287
|
-
}
|
|
48288
|
-
function buildDeletionDependencies(deleteIds, state) {
|
|
48289
|
-
const dependedBy = /* @__PURE__ */ new Map();
|
|
48290
|
-
for (const id of deleteIds) dependedBy.set(id, /* @__PURE__ */ new Set());
|
|
48291
|
-
for (const id of deleteIds) {
|
|
48292
|
-
const resource = state.resources[id];
|
|
48293
|
-
if (!resource?.dependencies) continue;
|
|
48294
|
-
for (const dep of resource.dependencies) {
|
|
48295
|
-
if (!deleteIds.has(dep)) continue;
|
|
48296
|
-
dependedBy.get(dep).add(id);
|
|
48297
|
-
}
|
|
48298
|
-
}
|
|
48299
|
-
this.addImplicitDeleteDependencies(deleteIds, state, dependedBy);
|
|
48300
|
-
return dependedBy;
|
|
48301
|
-
}
|
|
48302
|
-
function addImplicitDeleteDependencies(deleteIds, state, dependedBy) {
|
|
48303
|
-
const typeToIds = /* @__PURE__ */ new Map();
|
|
48304
|
-
for (const id of deleteIds) {
|
|
48305
|
-
const resource = state.resources[id];
|
|
48306
|
-
if (!resource) continue;
|
|
48307
|
-
const ids = typeToIds.get(resource.resourceType) ?? [];
|
|
48308
|
-
ids.push(id);
|
|
48309
|
-
typeToIds.set(resource.resourceType, ids);
|
|
48310
|
-
}
|
|
48311
|
-
for (const id of deleteIds) {
|
|
48312
|
-
const resource = state.resources[id];
|
|
48313
|
-
if (!resource) continue;
|
|
48314
|
-
const mustDeleteAfter = IMPLICIT_DELETE_DEPENDENCIES[resource.resourceType];
|
|
48315
|
-
if (!mustDeleteAfter) continue;
|
|
48316
|
-
for (const depType of mustDeleteAfter) {
|
|
48317
|
-
const depIds = typeToIds.get(depType);
|
|
48318
|
-
if (!depIds) continue;
|
|
48319
|
-
for (const depId of depIds) {
|
|
48320
|
-
if (!dependedBy.has(id)) dependedBy.set(id, /* @__PURE__ */ new Set());
|
|
48321
|
-
if (!dependedBy.get(id).has(depId)) {
|
|
48322
|
-
dependedBy.get(id).add(depId);
|
|
48323
|
-
this.logger.debug(safeMsg`Implicit delete dependency: ${depId} (${depType}) must be deleted before ${id} (${resource.resourceType})`);
|
|
48324
|
-
}
|
|
48325
|
-
}
|
|
48326
|
-
}
|
|
48327
|
-
}
|
|
48328
|
-
const scoped = {};
|
|
48329
|
-
for (const id of deleteIds) {
|
|
48330
|
-
const resource = state.resources[id];
|
|
48331
|
-
if (resource) scoped[id] = resource;
|
|
48332
|
-
}
|
|
48333
|
-
for (const { before, after } of computeImplicitDeleteEdges(scoped)) {
|
|
48334
|
-
if (!dependedBy.has(after)) dependedBy.set(after, /* @__PURE__ */ new Set());
|
|
48335
|
-
if (!dependedBy.get(after).has(before)) {
|
|
48336
|
-
dependedBy.get(after).add(before);
|
|
48337
|
-
this.logger.debug(safeMsg`Implicit delete dependency: ${before} (${scoped[before]?.resourceType}) must be deleted before ${after} (${scoped[after]?.resourceType})`);
|
|
48338
|
-
}
|
|
48339
|
-
}
|
|
48340
|
-
}
|
|
48341
|
-
|
|
48342
48507
|
//#endregion
|
|
48343
48508
|
//#region src/deployment/deploy-engine.ts
|
|
48344
48509
|
const EMPTY_SECRETS = /* @__PURE__ */ new Map();
|
|
@@ -48375,10 +48540,9 @@ var DeployEngine = class {
|
|
|
48375
48540
|
resolver;
|
|
48376
48541
|
interrupted = false;
|
|
48377
48542
|
interruptCause = null;
|
|
48378
|
-
observedCaptureTasks = /* @__PURE__ */ new Map();
|
|
48379
48543
|
absentJournalVersionPurge;
|
|
48380
48544
|
noEchoCeilingReadbackTimeoutMs = 3e4;
|
|
48381
|
-
|
|
48545
|
+
observedCapture;
|
|
48382
48546
|
stateBackend;
|
|
48383
48547
|
lockManager;
|
|
48384
48548
|
dagBuilder;
|
|
@@ -48390,33 +48554,19 @@ var DeployEngine = class {
|
|
|
48390
48554
|
recordedImports = [];
|
|
48391
48555
|
recordedOutputReads = [];
|
|
48392
48556
|
perResourceSecrets = /* @__PURE__ */ new Map();
|
|
48393
|
-
|
|
48394
|
-
persistedNoEchoAttributes = /* @__PURE__ */ new Map();
|
|
48395
|
-
noEchoConditions;
|
|
48396
|
-
inheritedNoEchoParameters = /* @__PURE__ */ new Set();
|
|
48397
|
-
noEchoPhysicalIdWarned = /* @__PURE__ */ new Set();
|
|
48398
|
-
noEchoPositionedValues = /* @__PURE__ */ new Map();
|
|
48399
|
-
noEchoExactEchoes = /* @__PURE__ */ new Map();
|
|
48400
|
-
noEchoAttributeReads = /* @__PURE__ */ new Map();
|
|
48557
|
+
noEchoRun = new NoEchoRunState();
|
|
48401
48558
|
replacedDeleteSkips = /* @__PURE__ */ new Map();
|
|
48402
48559
|
deferredReplacedDeletes = void 0;
|
|
48403
48560
|
secretNameNeedles = /* @__PURE__ */ new Map();
|
|
48404
48561
|
perResourceTemplateProps = /* @__PURE__ */ new Map();
|
|
48405
48562
|
perResourceResolvedType = /* @__PURE__ */ new Map();
|
|
48406
|
-
witnessConfirmedLeaves = /* @__PURE__ */ new Map();
|
|
48407
48563
|
fingerprintNoEchoValues = void 0;
|
|
48408
48564
|
preDeploySecretNamedRecords = void 0;
|
|
48565
|
+
storedNoEchoNamingValues = /* @__PURE__ */ new Map();
|
|
48409
48566
|
fingerprintParameters = void 0;
|
|
48410
48567
|
fingerprintChildTemplates = void 0;
|
|
48411
48568
|
perResourceInputFingerprints = /* @__PURE__ */ new Map();
|
|
48412
|
-
|
|
48413
|
-
outputsPassSecretMaps = [];
|
|
48414
|
-
outputsTemplateSource = Object.create(null);
|
|
48415
|
-
resolvedExportNames = [];
|
|
48416
|
-
carriedExportAliasRefusal;
|
|
48417
|
-
skippedOutputs;
|
|
48418
|
-
constructPathTemplate;
|
|
48419
|
-
outputsSourceUsable = true;
|
|
48569
|
+
outputsRun = new OutputsRunState();
|
|
48420
48570
|
attemptedResolvedProps = /* @__PURE__ */ new Map();
|
|
48421
48571
|
resumedCreates = /* @__PURE__ */ new Map();
|
|
48422
48572
|
generatedNameGuard;
|
|
@@ -48428,11 +48578,8 @@ var DeployEngine = class {
|
|
|
48428
48578
|
updatesThatSentNothing = /* @__PURE__ */ new Set();
|
|
48429
48579
|
updateWasReplaced = /* @__PURE__ */ new Map();
|
|
48430
48580
|
inPlaceCreateOnlyPaths = /* @__PURE__ */ new Map();
|
|
48431
|
-
outputProvenanceSinks = /* @__PURE__ */ new Map();
|
|
48432
|
-
outputsResolvedThisRun = /* @__PURE__ */ new WeakSet();
|
|
48433
48581
|
provenanceBaseline = void 0;
|
|
48434
|
-
|
|
48435
|
-
provenanceCaptureTasks = /* @__PURE__ */ new Map();
|
|
48582
|
+
provenanceCapture;
|
|
48436
48583
|
oldDeletedBeforeCreate = /* @__PURE__ */ new Set();
|
|
48437
48584
|
get healBaseline() {
|
|
48438
48585
|
return this.attributeHealer.baseline;
|
|
@@ -48467,6 +48614,19 @@ var DeployEngine = class {
|
|
|
48467
48614
|
this.options.resourceTimeoutMs = options.resourceTimeoutMs ?? 18e5;
|
|
48468
48615
|
this.options.captureObservedState = options.captureObservedState ?? true;
|
|
48469
48616
|
this.attributeHealer = this.rebaseline({});
|
|
48617
|
+
this.provenanceCapture = this.freshProvenanceCapture();
|
|
48618
|
+
this.observedCapture = this.freshObservedCapture();
|
|
48619
|
+
}
|
|
48620
|
+
freshObservedCapture() {
|
|
48621
|
+
return new ObservedCapture({
|
|
48622
|
+
logger: this.logger,
|
|
48623
|
+
options: this.options,
|
|
48624
|
+
resolver: this.resolver,
|
|
48625
|
+
providerRegistry: this.providerRegistry,
|
|
48626
|
+
printingSecretsFor: (logicalId) => this.printingSecretsFor(logicalId),
|
|
48627
|
+
fingerprintNoEchoValues: () => this.fingerprintNoEchoValues,
|
|
48628
|
+
provenanceCapture: () => this.provenanceCapture
|
|
48629
|
+
});
|
|
48470
48630
|
}
|
|
48471
48631
|
rebaseline(resources) {
|
|
48472
48632
|
this.attributeHealer = new AttributeHealer({
|
|
@@ -48474,31 +48634,53 @@ var DeployEngine = class {
|
|
|
48474
48634
|
stackRegion: this.stackRegion,
|
|
48475
48635
|
logger: this.logger,
|
|
48476
48636
|
baseline: resources,
|
|
48477
|
-
resolvedSecretsOf: (logicalId) => this.perResourceSecrets.get(logicalId)
|
|
48637
|
+
resolvedSecretsOf: (logicalId) => this.perResourceSecrets.get(logicalId),
|
|
48638
|
+
namingSecrets: () => this.stateNamingSecrets()
|
|
48478
48639
|
});
|
|
48479
48640
|
return this.attributeHealer;
|
|
48480
48641
|
}
|
|
48642
|
+
freshProvenanceCapture() {
|
|
48643
|
+
return new ProvenanceCapture({
|
|
48644
|
+
buildResolverContext: (...args) => this.buildResolverContext(...args),
|
|
48645
|
+
resolver: this.resolver,
|
|
48646
|
+
logger: this.logger
|
|
48647
|
+
});
|
|
48648
|
+
}
|
|
48649
|
+
outputsDeps() {
|
|
48650
|
+
return {
|
|
48651
|
+
options: this.options,
|
|
48652
|
+
logger: this.logger,
|
|
48653
|
+
resolver: this.resolver,
|
|
48654
|
+
buildResolverContext: (...args) => this.buildResolverContext(...args),
|
|
48655
|
+
noEchoPositionSources: (...args) => noEchoPositionSources(this.noEchoRun, ...args)
|
|
48656
|
+
};
|
|
48657
|
+
}
|
|
48658
|
+
noEchoDeps() {
|
|
48659
|
+
return {
|
|
48660
|
+
stackRegion: this.stackRegion,
|
|
48661
|
+
logger: this.logger,
|
|
48662
|
+
providerRegistry: this.providerRegistry,
|
|
48663
|
+
perResourceSecrets: () => this.perResourceSecrets,
|
|
48664
|
+
perResourceTemplateProps: () => this.perResourceTemplateProps,
|
|
48665
|
+
perResourceResolvedType: () => this.perResourceResolvedType,
|
|
48666
|
+
outputsRun: () => this.outputsRun,
|
|
48667
|
+
readReaderForFreshNoEchoCeiling: (...args) => this.readReaderForFreshNoEchoCeiling(...args),
|
|
48668
|
+
maskForResource: (...args) => this.maskForResource(...args)
|
|
48669
|
+
};
|
|
48670
|
+
}
|
|
48481
48671
|
async deploy(stackName, template) {
|
|
48482
48672
|
this.recordedImports = [];
|
|
48483
48673
|
this.recordedOutputReads = [];
|
|
48484
48674
|
this.perResourceSecrets = /* @__PURE__ */ new Map();
|
|
48485
|
-
this.
|
|
48486
|
-
this.persistedNoEchoAttributes = /* @__PURE__ */ new Map();
|
|
48487
|
-
this.noEchoConditions = void 0;
|
|
48488
|
-
this.inheritedNoEchoParameters = /* @__PURE__ */ new Set();
|
|
48489
|
-
this.noEchoPhysicalIdWarned = /* @__PURE__ */ new Set();
|
|
48490
|
-
this.noEchoPositionedValues = /* @__PURE__ */ new Map();
|
|
48491
|
-
this.noEchoExactEchoes = /* @__PURE__ */ new Map();
|
|
48492
|
-
this.noEchoAttributeReads = /* @__PURE__ */ new Map();
|
|
48675
|
+
this.noEchoRun = new NoEchoRunState();
|
|
48493
48676
|
this.replacedDeleteSkips = /* @__PURE__ */ new Map();
|
|
48494
48677
|
this.deferredReplacedDeletes = void 0;
|
|
48495
48678
|
this.secretNameNeedles = /* @__PURE__ */ new Map();
|
|
48496
48679
|
this.perResourceTemplateProps = /* @__PURE__ */ new Map();
|
|
48497
|
-
this.constructPathTemplate = void 0;
|
|
48498
48680
|
this.perResourceResolvedType = /* @__PURE__ */ new Map();
|
|
48499
|
-
this.witnessConfirmedLeaves = /* @__PURE__ */ new Map();
|
|
48500
48681
|
this.fingerprintNoEchoValues = void 0;
|
|
48501
48682
|
this.preDeploySecretNamedRecords = void 0;
|
|
48683
|
+
this.storedNoEchoNamingValues = /* @__PURE__ */ new Map();
|
|
48502
48684
|
this.fingerprintParameters = void 0;
|
|
48503
48685
|
this.fingerprintChildTemplates = void 0;
|
|
48504
48686
|
this.perResourceInputFingerprints = /* @__PURE__ */ new Map();
|
|
@@ -48506,11 +48688,7 @@ var DeployEngine = class {
|
|
|
48506
48688
|
this.resumedCreates = /* @__PURE__ */ new Map();
|
|
48507
48689
|
this.generatedNameGuard = void 0;
|
|
48508
48690
|
this.liveTaskLabels = /* @__PURE__ */ new Map();
|
|
48509
|
-
this.
|
|
48510
|
-
this.outputsPassSecretMaps = [];
|
|
48511
|
-
this.outputsTemplateSource = Object.create(null);
|
|
48512
|
-
this.outputsSourceUsable = true;
|
|
48513
|
-
this.skippedOutputs = void 0;
|
|
48691
|
+
this.outputsRun = new OutputsRunState();
|
|
48514
48692
|
this.retainedOldOnReplacement = /* @__PURE__ */ new Set();
|
|
48515
48693
|
this.replacedOldMaySurvive = /* @__PURE__ */ new Map();
|
|
48516
48694
|
this.recreatedUnderSameId = /* @__PURE__ */ new Set();
|
|
@@ -48518,11 +48696,9 @@ var DeployEngine = class {
|
|
|
48518
48696
|
this.updatesThatSentNothing = /* @__PURE__ */ new Set();
|
|
48519
48697
|
this.updateWasReplaced = /* @__PURE__ */ new Map();
|
|
48520
48698
|
this.inPlaceCreateOnlyPaths = /* @__PURE__ */ new Map();
|
|
48521
|
-
this.outputProvenanceSinks = /* @__PURE__ */ new Map();
|
|
48522
|
-
this.outputsResolvedThisRun = /* @__PURE__ */ new WeakSet();
|
|
48523
48699
|
this.provenanceBaseline = void 0;
|
|
48524
|
-
this.
|
|
48525
|
-
this.
|
|
48700
|
+
this.provenanceCapture = this.freshProvenanceCapture();
|
|
48701
|
+
this.observedCapture = this.freshObservedCapture();
|
|
48526
48702
|
this.oldDeletedBeforeCreate = /* @__PURE__ */ new Set();
|
|
48527
48703
|
this.rebaseline({});
|
|
48528
48704
|
this.runProducerRegionEvidence = void 0;
|
|
@@ -48540,15 +48716,15 @@ var DeployEngine = class {
|
|
|
48540
48716
|
const secrets = this.perResourceSecrets.get(logicalId);
|
|
48541
48717
|
const templateProps = this.perResourceTemplateProps.get(logicalId);
|
|
48542
48718
|
const scrubbed = scrubResourceRecord(this.attributeHealer.withHealedAttributes(logicalId, record), secrets ?? /* @__PURE__ */ new Map(), templateProps);
|
|
48543
|
-
const noEchoScrubbed = this.
|
|
48544
|
-
resources[logicalId] = withReferenceProvenance(withConstructPath(withMaskedPropertyFingerprints(noEchoScrubbed, record.properties, templateProps, secrets, this.fingerprintNoEchoValues, this.perResourceInputFingerprints.get(logicalId)), constructPathOf(this.constructPathTemplate, logicalId)), this.referenceProvenanceToPersist(logicalId, record, noEchoScrubbed, secrets));
|
|
48719
|
+
const noEchoScrubbed = applyNoEchoPersist(this.noEchoRun, this.noEchoDeps(), logicalId, record, withNoEchoExactEchoes(this.noEchoRun, logicalId, scrubbed), templateProps, state.resources, secrets);
|
|
48720
|
+
resources[logicalId] = withReferenceProvenance(withConstructPath(withMaskedPropertyFingerprints(noEchoScrubbed, record.properties, templateProps, secrets, this.fingerprintNoEchoValues, this.perResourceInputFingerprints.get(logicalId)), constructPathOf(this.noEchoRun.constructPathTemplate, logicalId)), this.referenceProvenanceToPersist(logicalId, record, noEchoScrubbed, secrets));
|
|
48545
48721
|
}
|
|
48546
48722
|
const orphans = state.orphans?.map((entry) => {
|
|
48547
48723
|
const sameResource = this.perResourceResolvedType.get(entry.logicalId) === entry.state.resourceType;
|
|
48548
48724
|
const orphanTemplateProps = sameResource ? this.perResourceTemplateProps.get(entry.logicalId) : void 0;
|
|
48549
48725
|
return {
|
|
48550
48726
|
...entry,
|
|
48551
|
-
state: withMaskedPropertyFingerprints(this.
|
|
48727
|
+
state: withMaskedPropertyFingerprints(applyNoEchoPersist(this.noEchoRun, this.noEchoDeps(), entry.logicalId, entry.state, scrubResourceRecord(entry.state, (sameResource ? this.perResourceSecrets.get(entry.logicalId) : void 0) ?? /* @__PURE__ */ new Map(), orphanTemplateProps), orphanTemplateProps, state.resources), entry.state.properties, orphanTemplateProps, sameResource ? this.perResourceSecrets.get(entry.logicalId) : void 0, sameResource ? this.fingerprintNoEchoValues : void 0, sameResource ? this.perResourceInputFingerprints.get(entry.logicalId) : void 0)
|
|
48552
48728
|
};
|
|
48553
48729
|
});
|
|
48554
48730
|
const outputs = this.redactOutputs(state.outputs);
|
|
@@ -48565,9 +48741,9 @@ var DeployEngine = class {
|
|
|
48565
48741
|
};
|
|
48566
48742
|
}
|
|
48567
48743
|
outputReferenceProvenanceFor(outputs, redacted) {
|
|
48568
|
-
const sinkOf = (outputKey) => this.outputProvenanceSinks.get(outputKey);
|
|
48744
|
+
const sinkOf = (outputKey) => this.outputsRun.outputProvenanceSinks.get(outputKey);
|
|
48569
48745
|
const baseline = this.provenanceBaseline;
|
|
48570
|
-
if (!this.outputsResolvedThisRun.has(outputs) && baseline !== void 0 && outputs === baseline.outputs && baseline.outputReferenceProvenance === void 0 && !baseline.tokenFree && this.resolvedOutputsBag !== void 0 && outputMapsEqual(this.redactOutputs(this.resolvedOutputsBag), redacted)) return outputProvenanceForPersist({
|
|
48746
|
+
if (!this.outputsRun.outputsResolvedThisRun.has(outputs) && baseline !== void 0 && outputs === baseline.outputs && baseline.outputReferenceProvenance === void 0 && !baseline.tokenFree && this.outputsRun.resolvedOutputsBag !== void 0 && outputMapsEqual(this.redactOutputs(this.outputsRun.resolvedOutputsBag), redacted)) return outputProvenanceForPersist({
|
|
48571
48747
|
outputs: redacted,
|
|
48572
48748
|
resolvedThisRun: true,
|
|
48573
48749
|
carriedFrom: void 0,
|
|
@@ -48575,7 +48751,7 @@ var DeployEngine = class {
|
|
|
48575
48751
|
});
|
|
48576
48752
|
return outputProvenanceForPersist({
|
|
48577
48753
|
outputs: redacted,
|
|
48578
|
-
resolvedThisRun: this.outputsResolvedThisRun.has(outputs),
|
|
48754
|
+
resolvedThisRun: this.outputsRun.outputsResolvedThisRun.has(outputs),
|
|
48579
48755
|
carriedFrom: baseline !== void 0 && outputs === baseline.outputs ? baseline : void 0,
|
|
48580
48756
|
sinkOf
|
|
48581
48757
|
});
|
|
@@ -48693,17 +48869,6 @@ var DeployEngine = class {
|
|
|
48693
48869
|
return maskingRetryLogger(this.logger, secrets);
|
|
48694
48870
|
}
|
|
48695
48871
|
};
|
|
48696
|
-
DeployEngine.prototype.hasPending = hasPending;
|
|
48697
|
-
DeployEngine.prototype.buildDeletionDependencies = buildDeletionDependencies;
|
|
48698
|
-
DeployEngine.prototype.addImplicitDeleteDependencies = addImplicitDeleteDependencies;
|
|
48699
|
-
DeployEngine.prototype.auditResolvedAssetReferences = auditResolvedAssetReferences;
|
|
48700
|
-
DeployEngine.prototype.extractAllDependencies = extractAllDependencies;
|
|
48701
|
-
DeployEngine.prototype.propertiesToRecord = propertiesToRecord;
|
|
48702
|
-
DeployEngine.prototype.extractTemplateAttributes = extractTemplateAttributes;
|
|
48703
|
-
DeployEngine.prototype.isPinnedToCcApi = isPinnedToCcApi;
|
|
48704
|
-
DeployEngine.prototype.recreateDirectionFor = recreateDirectionFor;
|
|
48705
|
-
DeployEngine.prototype.peekRoutingForLabel = peekRoutingForLabel;
|
|
48706
|
-
DeployEngine.prototype.preparePropertiesForCcApi = preparePropertiesForCcApi;
|
|
48707
48872
|
DeployEngine.prototype.buildResolverContext = buildResolverContext;
|
|
48708
48873
|
DeployEngine.prototype.maskedInputSources = maskedInputSources;
|
|
48709
48874
|
DeployEngine.prototype.doDeployWithPrefetch = doDeployWithPrefetch;
|
|
@@ -48740,15 +48905,9 @@ DeployEngine.prototype.secretNameBagFor = secretNameBagFor;
|
|
|
48740
48905
|
DeployEngine.prototype.noteSecretNamedRecord = noteSecretNamedRecord;
|
|
48741
48906
|
DeployEngine.prototype.printingSecretsFor = printingSecretsFor;
|
|
48742
48907
|
DeployEngine.prototype.namingSecretsFor = namingSecretsFor;
|
|
48908
|
+
DeployEngine.prototype.stateNamingSecrets = stateNamingSecrets;
|
|
48909
|
+
DeployEngine.prototype.captureStoredNoEchoNamingValues = captureStoredNoEchoNamingValues;
|
|
48743
48910
|
DeployEngine.prototype.noteSecretNamedReads = noteSecretNamedReads;
|
|
48744
|
-
DeployEngine.prototype.kickOffObservedCapture = kickOffObservedCapture;
|
|
48745
|
-
DeployEngine.prototype.drainObservedCaptures = drainObservedCaptures;
|
|
48746
|
-
DeployEngine.prototype.kickOffProvenanceCapture = kickOffProvenanceCapture;
|
|
48747
|
-
DeployEngine.prototype.drainProvenanceCaptures = drainProvenanceCaptures;
|
|
48748
|
-
DeployEngine.prototype.buildObservedCaptureSiblings = buildObservedCaptureSiblings;
|
|
48749
|
-
DeployEngine.prototype.stampReasonlessParameterRefusals = stampReasonlessParameterRefusals;
|
|
48750
|
-
DeployEngine.prototype.kickOffAutoRefreshObservedProperties = kickOffAutoRefreshObservedProperties;
|
|
48751
|
-
DeployEngine.prototype.kickOffMaskedBaselineRecapture = kickOffMaskedBaselineRecapture;
|
|
48752
48911
|
DeployEngine.prototype.adoptRollbackOrphans = adoptRollbackOrphans;
|
|
48753
48912
|
DeployEngine.prototype.performRollback = performRollback;
|
|
48754
48913
|
DeployEngine.prototype.settleJournalAfterSuccess = settleJournalAfterSuccess;
|
|
@@ -48760,23 +48919,7 @@ DeployEngine.prototype.rollbackExecutorContext = rollbackExecutorContext;
|
|
|
48760
48919
|
DeployEngine.prototype.producerRegionEvidence = producerRegionEvidence;
|
|
48761
48920
|
DeployEngine.prototype.writeRollbackJournalSegment = writeRollbackJournalSegment;
|
|
48762
48921
|
DeployEngine.prototype.redactOperationsForJournal = redactOperationsForJournal;
|
|
48763
|
-
|
|
48764
|
-
|
|
48765
|
-
DeployEngine.prototype.applyNoEchoPersist = applyNoEchoPersist;
|
|
48766
|
-
|
|
48767
|
-
DeployEngine.prototype.warnNoEchoPhysicalId = warnNoEchoPhysicalId;
|
|
48768
|
-
DeployEngine.prototype.seedPersistedNoEchoAttributes = seedPersistedNoEchoAttributes;
|
|
48769
|
-
DeployEngine.prototype.noEchoAttributeOverridesFor = noEchoAttributeOverridesFor;
|
|
48770
|
-
DeployEngine.prototype.noEchoDiffComparison = noEchoDiffComparison;
|
|
48771
|
-
DeployEngine.prototype.noteNoEchoExactEchoes = noteNoEchoExactEchoes;
|
|
48772
|
-
DeployEngine.prototype.establishNoEchoEchoFidelity = establishNoEchoEchoFidelity;
|
|
48773
|
-
DeployEngine.prototype.withNoEchoExactEchoes = withNoEchoExactEchoes;
|
|
48774
|
-
DeployEngine.prototype.handleOutputResolutionFailure = handleOutputResolutionFailure;
|
|
48775
|
-
DeployEngine.prototype.resolveOutputs = resolveOutputs;
|
|
48776
|
-
DeployEngine.prototype.buildDisplayOutputs = buildDisplayOutputs;
|
|
48777
|
-
DeployEngine.prototype.replacementNameOrigin = replacementNameOrigin;
|
|
48778
|
-
DeployEngine.prototype.orphanedNameCollisionAdvice = orphanedNameCollisionAdvice;
|
|
48779
|
-
|
|
48780
|
-
//#endregion
|
|
48781
|
-
export { S3_AUTO_DELETE_OBJECTS_TAG as $, repairMalformedResourcesForReadOnly as $a, escapeRegExp$3 as $c, hasReadableOrphans as $i, unsupportedFinalSnapshotError as $n, liveMatchesUnresolvedTokenFrame as $o, IntrinsicFunctionResolver as $r, applyCrossPrefixScan as $s, isJournaledOrphan as $t, diffSecurity as A, refuseMalformedOrphansForOrphan as Aa, parseBootstrapMarker as Ac, getAccountInfo as Ai, AssemblyReader as Al, collectPublishedOutputNames as An, requireConfigString as Ao, withPrintingSecrets as Ar, recordAttributeIdCopy as As, NESTED_PENDING_PARENT_REASON as At, readProtection as B, refuseMalformedResourcePropertiesForDestroy as Ba, dockerSpawnEnvWithSensitive as Bc, parseWebACLArn as Bi, displayAssemblyPath as Bl, secretNamePrintingBags as Bn, canonicalCoordinates as Bo, deleteLeftInPlace as Br, wholeStringLeavesOf as Bs, collectNestedChildUnaddressed as Bt, withApiLimit as C, previewableOrphanRecords as Ca, rewriteTemplateAssetReferences as Cc, classifyRecordedSecretRegion as Ci, uploadCfnTemplate as Cl, secretSafeKeyDisplay as Cn, configBooleanRefusal as Co, isCustomResource as Cr, isUncertifiedBaselineMaskPosition as Cs, dropFailedCommands as Ct, findServiceTokenRefusals as D, refuseMalformedOrphanRecordsForDestroy as Da, ensureAssetStorage as Dc, coerceParameterTypedValue as Di, PARTITION_TABLE as Dl, isWholeDynamicReferenceValue as Dn, replayWarn as Do, readsNoEchoDeleteValues as Dr, recordNestedStackParameterExpressions as Ds, loadJournaledOrphans as Dt, deferredServiceTokenWarning as E, refuseMalformedOrphanRecords as Ea, assertAssetBucketRegion as Ec, regionLessSecretName as Ei, expectedOwnerParam as El, exportNameSecretExposure as En, readConfigString as Eo, TemplateNoEchoReresolver as Er, inheritNestedStackParameterAssociations as Es, journaledOrphanLines as Et, recordedProtectionEvidence as F, refuseMalformedResourceEntriesForDeploy as Fa, buildDockerImage as Fc, keepsSecretReferenceToken as Fi, hasPlainPrototype$1 as Fl, completedReplayEntries as Fn, canonicalLambdaFunctionName as Fo, slowCcOperationTimeoutMs as Fr, recordMaskOnlyValue as Fs, nestedChildStackName as Ft, deleteBudgetKey as G, refuseMalformedResourcesForDestroy as Ga, isMalformedEnvKey as Gc, JSON_LISTING_HOLE_VALUE as Gi, clearBucketRegionCache as Gl, ATOMIC_FINAL_SNAPSHOT_TYPES as Gn, maskedLeafCoordinatesOf as Go, disableInstanceApiTermination as Gr, WHOLE_DYNAMIC_REFERENCE_PATTERN as Gs, awaitInFlightSibling as Gt, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as H, refuseMalformedResourcePropertiesForExport as Ha, formatDockerLoginError as Hc, parameterInputsFor as Hi, resolveAssemblyPath as Hl, stateSecretNameNeedles as Hn, maskAtCoordinates as Ho, withIndeterminateGuard as Hr, STATE_SOURCED_CROSS_GENERATION_RULES as Hs, withNestedStackContext as Ht, recordedProtectionNote as I, refuseMalformedResourceEntriesForDestroy as Ia, resolveDockerContextDirectory as Ic, AWS_NO_VALUE as Ii, nullPrototypeRecord as Il, journaledOrphanPrintingBag as In, lambdaFunctionNameForMask as Io, unchangedBehindSecretReference as Ir, recordMaskOnlyValuesIn as Is, recordDisplacedSkips as It, DELETE_INDEX_WAIT_PROCEED_NOTE as J, repairMalformedOrphanRecordsForReadOnly as Ja, redactedCause as Jc, UNREADABLE_ORPHANS_CONTAINER_ROW as Ji, ccRoutedFinalSnapshotError as Jn, noEchoOutputsComparison as Jo, observeThenDisableInstanceApiTermination as Jr, isLockInfoExpired as Js, withStackRecords as Jt, resolveDynamoDbDeleteBudgetClock as K, refuseMalformedResourcesForExport as Ka, partitionSensitiveEnv as Kc, STATE_REGION_DIVERGED as Ki, resolveBucketRegion as Kl, PRE_DELETE_SNAPSHOT_TYPES as Kn, noEchoCoordinatesOf as Ko, ec2InstanceProtectionSite as Kr, isSingleDynamicReferenceToken as Ks, destroyStackRecordsView as Kt, PROTECTION_PROPERTY_BY_TYPE as L, refuseMalformedResourceEntriesForImport as La, describeDockerCapturedOutput as Lc, cfnRefValueFromPhysicalId as Li, ownValue as Ll, maskEventTextWithBoundBags as Ln, sameLambdaFunctionAddress as Lo, RollbackInlinePolicyWriters as Lr, recordNoEchoAttributeValues as Ls, revertNestedChildFromJournal as Lt, noEchoComparisonForTemplate as M, refuseMalformedOutputsForDestroy as Ma, validateAssetBucketName as Mc, carriesDynamicReference as Mi, processStackMessages as Ml, bindingSkippedOutputs as Mn, templateResourceTypes as Mo, applyCustomResourceResponseExpiration as Mr, splitGetAttStringForm as Ms, displacedPhysicalIdShown as Mt, noEchoExactEchoLeavesOf as N, refuseMalformedResourceAttributesForOrphan as Na, validateContainerRepoName as Nc, carriesFetchableDynamicReference as Ni, defineOwnKey as Nl, DEFAULT_RESOURCE_TIMEOUT_MS as Nn, describeTypeWithThrottleRetry as No, customResourceResponseExpirationWarning as Nr, carriesSecretMask as Ns, dropSettledNestedJournals as Nt, serviceTokenBlockingReason as O, refuseMalformedOrphans as Oa, getBootstrapMarkerKey as Oc, isUnboundTemplateParameter as Oi, canonicalizeRegion as Ol, noEchoParameterValueSeed as On, requireConfigArray as Oo, isCustomResourceType as Or, recoverMaskedOutput as Os, makeForeignHolderScan as Ot, noEchoParameterNamesOf as P, refuseMalformedResourceEntries as Pa, buildDenyExternalAccessPolicy as Pc, isNamelessDynamicReferenceError as Pi, hasOwnKey as Pl, DEFAULT_RESOURCE_WARN_AFTER_MS as Pn, withRetry as Po, CloudControlProvider as Pr, provenPublicValue as Ps, getNestedRevertRun as Pt, ECR_AUTO_DELETE_IMAGES_TAG as Q, repairMalformedResourcePropertiesForReadOnly as Qa, warnFinchArgvExposure as Qc, displayLogicalId as Qi, refusesFinalSnapshot as Qn, valueAtCoordinate as Qo, INTRINSIC_KEYS as Qr, CrossPrefixScanCache as Qs, demoteSupersededOrphans as Qt, isProtectionValueActive as R, refuseMalformedResourceEntriesForImportSave as Ra, describeDockerExecFailure as Rc, isStalePlaceholderArnAttribute as Ri, absoluteAssemblyPathEscape as Rl, orphanRecordsPrintingBag as Rn, DagBuilder as Ro, UNSPECIFIED_SKIP_REASON as Rr, recordNoEchoParameterFreshValue as Rs, revertedNestedRowIds as Rt, lookupEachName as S, malformedStateRefusalMessage as Sa, loadPublishableAssetManifest as Sc, s3BucketWebsiteUrl as Si, findLargeInlineResources as Sl, secretBearingStateKeyWarning as Sn, coerceCfnInteger as So, ccBrokenReason as Sr, dynamicReferenceTokens as Ss, deleteJournaledOrphans as St, recordRetainedForReadoption as T, refuseMalformedNestedChildOutputs as Ta, BOOTSTRAP_MARKER_PREFIX as Tc, producerRegionsFromState as Ti, decodeListingKey as Tl, exportNameNoEchoParameters as Tn, configStringRefusal as To, waitForLambdaFunctionActive as Tr, identityKeyFor as Ts, isHandledOrphan as Tt, beginDeleteWait as U, refuseMalformedResourcePropertiesForOrphan as Ua, getDockerCmd as Uc, passedParameterClassesOf as Ui, injectAwsRegion as Ul, storedSecretNameNeedles as Un, maskReadbackAtCoordinates as Uo, isWaitAbandonedError as Ur, STATE_SOURCED_READBACK_RULES as Us, replayFailedOperations as Ut, DynamoDBGlobalTableProvider as V, refuseMalformedResourcePropertiesForDrift as Va, finchSecretArgvRefusal as Vc, withSharedDrainBudget as Vi, renderAssemblyPathEscape as Vl, secretNamedRecordNeedles as Vn, isMarkedCoordinate as Vo, deleteSkipReason as Vr, STATE_SOURCED_BASELINE_RULES as Vs, getCurrentNestedStackContext as Vt, compensateRemovedDeletionProtection as W, refuseMalformedResourcesForDeploy as Wa, isDockerClientEnvKey as Wc, declaresNoEcho as Wi, injectedAwsRegionValue as Wl, extractDeploymentEventError as Wn, maskWholeValue as Wo, markWaitAbandoned as Wr, TEMPLATE_SOURCED_RULES as Ws, replayRollback as Wt, deleteTableWithIndexBusyRetry as X, repairMalformedOutputsForReadOnly as Xa, runDockerForeground as Xc, accountArgs as Xi, effectiveDeletionPolicy as Xn, readbackPathFor as Xo, reEnableInstanceApiTermination as Xr, rebuildClientForBucketRegion as Xs, replacedDeleteFailureVerdict as Xt, INDEX_SETTLE_POLL_INTERVAL_MS as Y, repairMalformedOrphansForReadOnly as Ya, redactedDockerCause as Yc, UNREADABLE_RESOURCES_MAP_ROW as Yi, createPreDeleteFinalSnapshot as Yn, passedNoEchoParametersOf as Yo, reDisableInstanceApiTermination as Yr, S3StateBackend as Ys, removeProtectionTypeList as Yt, waitForIndexesSettled as Z, repairMalformedResourceEntriesForReadOnly as Za, runDockerStreaming as Zc, deployRefusesOrphanRowsReason as Zi, isFinalSnapshotError as Zn, readsNoEchoSource as Zo, DiffCalculator as Zr, CrossPrefixReadError as Zs, recordAfterRollbackUpdate as Zt, keptWholeReasonText as _, malformedRenderedContainersWarning as _a, isSensitiveAttributeName as _c, recordedReferenceRegions as _i, warnDeprecatedNoPrefixCliFlag as _l, orphanNeedsIdentity as _n, coerceWarmThroughput as _o, tagPlanWarning as _r, redactSecretsForState as _s, planOrphanAdoption as _t, inheritedProvenanceForChildDiff as a, malformedExportNamesWarning as aa, describeRegionValueKind as ac, assertSendableRoleArn as ai, synthesisStatusMessage as al, replacementNeverSwapped as an, findSilentDropProperties as ao, ledgerForStack as ar, printingCorpusOf as as, createReadOnlyAttributeHealerFactory as at, chunks as b, malformedResourcesWarning as ba, buildAssetRedirectMap as bc, s3BucketDualStackDomainName as bi, CFN_TEMPLATE_URL_LIMIT as bl, exportAliasCollisionScrubWarning as bn, toFiniteNumber as bo, CC_BROKEN_REASON as br, withoutPhysicalNameCopies as bs, pendingRequestCount as bt, isAbsoluteAssetPath as c, malformedLocalResourceEntriesWarning as ca, hasReasonlessBaselineRefusal as cc, sendableAssumeRoleCommand as ci, loadCdkJson as cl, findNestedStackTypeChanges as cn, NO_CC_HANDLERS_REASON as co, acquireIdempotencyToken as cr, shareLogOnlyValues as cs, gray as ct, templateIdentity as d, malformedOrphanRecordsWarning as da, importableOutputs as dc, callerEnvCredentials as di, resolveCaptureObservedState as dl, REDACTED_DELETE_ADDRESS_SKIP_REASON as dn, shownType as do, DBPROXY_TAGS_WHAT as dr, errorCauseChain as ds, yellow as dt, hasReadableOutputs as ea, crossPrefixDeniedWarning as ec, poisonRenderedSpellingsCollidingIn as ei, stripControlChars as el, isReplacementOrphan as en, unpreviewableOrphanRecords as eo, maskingRetryLogger as er, carryLogOnlyValues as es, hasCdkAutoDeleteTag as et, conditionFingerprint as f, malformedOrphanRowsKeptWarning as fa, isReadableBag as fc, envCredentialsAreAssumedRole as fi, resolveSkipPrefix as fl, isRedactedRecordedValue as fn, MULTI_REGION_RECREATE_BLOCKED_TYPES as fo, DBPROXY_TAG_OPTIONS as fr, maskSecretsInError as fs, computeParameterTaint as ft, isSecretBearingReferenceString as g, malformedOutputsWarning as ga, AssetPublisher as gc, recordedOutputReferenceRegions as gi, stateBucketExistenceConfirmed as gl, updatePartialReason as gn, WARM_THROUGHPUT_MEMBERS as go, tagMapAsList as gr, snapshotPassProvenance as gs, makeSiblingClaimReader as gt, readRecordedConditionVerdicts as h, malformedOutputsRefusalMessage as ha, shouldRetainResource as hc, outputReferenceProvenanceOf as hi, resolveUseCdkBootstrapAssets as hl, updatePartialMessage as hn, renderStatefulReason as ho, refuseMalformedDesiredTags as hr, recordReferenceProvenanceEntry as hs, resourcesNamingDeclaredParameter as ht, crossStackOutputProvenanceSource as i, malformedDriftResourcePropertiesWarning as ia, acceptedCreateOnlyDropsOf as ic, assertFlagRoleArn as ii, Synthesizer as il, recordUnderIdIsNotOwn as in, findActionableSilentDrops as io, earliestDefined as ir, logOnlyValueCount as is, formatResourceLine as it, noEchoAttributeNamesOf as j, refuseMalformedOutputs as ja, readBootstrapMarkerBody as jc, isImpossibleEmptyStoredAttribute as ji, StageLoadError as jl, isExportAliasCollision as jn, prefetchCreateOnlyPropertyPaths as jo, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as jr, recordPhysicalNameCopy as js, displacedOpClause as jt, withResourceDeadline as k, refuseMalformedOrphansForDestroy as ka, isCrossRegionRedirect as kc, parameterTypeMayLoseSecretIdentity as ki, derivePartitionAndUrlSuffix as kl, collectDeclaredOutputNames as kn, requireConfigObject as ko, getCurrentResourceSecrets as kr, physicalNameCopiesOf as ks, sameJournaledOrphans as kt, listNestedTemplateRows as l, malformedLocalResourcesWarning as la, hasUnverifiableParameterRefusal as lc, AWS_CREDENTIAL_ENV_KEYS as li, resolveApp as ll, getCurrentProducerRegions as ln, hasNoCloudControlHandlers as lo, isRefusedByName as lr, unionOfSecretBags as ls, green as lt, parentSuppliedValues as m, malformedOrphansWarning as ma, orphansCarriedFrom as mc, keepHeldTokenProvenance as mi, resolveStateBucketWithDefaultAndSource as ml, redactedDeleteAddressSkip as mn, isStatefulRecreateTargetSync as mo, readTagList as mr, markSameGenerationBag as ms, reachableDivergentParameters as mt, IMPLICIT_DELETE_DEPENDENCIES as n, isReadableOrphanRecord as na, isNotImplemented as nc, refuseUnreadableCdkCrossAccountRefs as ni, AssetManifestLoader as nl, planRollback as nn, unreadableResourceEntries as no, findDestructiveChanges as nr, hasMaskableValues as ns, getPriorAttempts as nt, childTemplateLoader as o, malformedExportSourceWarning as oa, exportNamesCarriedFrom as oc, explicitRoleArnOrThrow as oi, getDefaultStateBucketName as ol, resolveReplacementOldType as on, unwrittenCreateOnlyReplacement as oo, reserveStackCreateToken as or, recordLogOnlyParameterValue as os, bold as ot, conditionInputsFrom as p, malformedOrphansRefusalMessage as pa, orphansAfterRollback as pc, isSettledInstanceState as pi, resolveStateBucketWithDefault as pl, redactedDeleteAddressFields as pn, isStatefulRecreateTargetForReplace as po, planTagDiff as pr, maskSecretsInText as ps, namesAnyDeclaredParameter as pt, resolveDynamoDbDeleteBudgetMs as q, refuseMalformedState as qa, redactDockerArgvValues as qc, STATE_RESOURCES_MALFORMED as qi, buildFinalSnapshotIdentifier as qn, noEchoLeavesOf as qo, isTerminationProtectionPropagationError as qr, LockManager as qs, getStackRecords as qt, computeImplicitDeleteEdges as r, isReadableResourceEntry as ra, splitImportedOps as rc, applyRoleArnIfSet as ri, getDockerImageBySourceHash as rl, recheckFailedPlan as rn, withheldAccountClause as ro, formatDestructiveChange as rr, literalSplitDelimitersOf as rs, markRefusedBeforeApplying as rt, findNestedTemplateTreeDefect as s, malformedLocalOutputsWarning as sa, hasReadableExportSet as sc, isIamRoleArn as si, getLegacyStateBucketName as sl, seedsDeleteFirstGuard as sn, withoutSilentDropProperties as so, withCreateTokenLedger as sr, recordLogOnlyValue as ss, cyan as st, DeployEngine as t, hasReadableResources as ta, isAccessDenied$1 as tc, producerLookupOver as ti, stripForDisplay as tl, planFailedOps as tn, unreadableOrphanRecords as to, constructPathOf as tr, createUnionSecretMasker as ts, isTruthyCfnBoolean as tt, renderNestedTemplateTreeDefect as u, malformedOrphanRecordsRefusalMessage as ua, importableOutputKeys as uc, applyCallerIdentityCredentials as ui, resolveAutoAssetStorage as ul, inheritProducerRegions as un, findReplacedReadersOfRecreateTargets as uo, markDeleteStarted as ur, createSecretMasker as us, red as ut, mergeNoChangeOutputs as v, malformedResourceEntriesWarning as va, stringifyValue as vc, s3BucketArn as vi, ssmResolvedValueType as vl, WITHHELD_NAME_DISPLAY as vn, isWarmThroughputDecrease as vo, definedAttributes as vr, scrubResourceRecord as vs, DeploymentEventsReader as vt, keptForReadoption as w, refuseDivergentRecordRegionForDestroy as wa, AssetModeResolver as wc, classifyReplaySecretRegion as wi, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as wl, carriedExportAliasExposure as wn, configIntegerRefusal as wo, wouldReturnToSdkProvider as wr, pathCrossesDottedKey as ws, dropFailedHint as wt, isAccessDeniedError as x, malformedScrubResourceEntriesRefusalMessage as xa, createAssetRedirectResolver as xc, s3BucketRegionalDomainName as xi, MIGRATE_TMP_PREFIX as xl, secretBearing as xn, coerceCfnBoolean as xo, ProviderRegistry as xr, DYNAMIC_REFERENCE_TOKEN_SCAN as xs, resolvePendingCloudControlRequests as xt, makeCanonicalizePropertiesFn as y, malformedResourcePropertiesWarning as ya, WorkGraph as yc, s3BucketDomainName as yi, CFN_TEMPLATE_BODY_LIMIT as yl, displayTextOrWithheld as yn, toCfnInteger as yo, stringifyIfAssigned as yr, withPhysicalNameCopies as ys, DeploymentEventsStore as yt, perType as z, refuseMalformedResourceEntriesForOrphan as za, describeDockerFailure as zc, refStateLookupFromResource as zi, describeFileReadFailure as zl, secretNamePrintingBag as zn, TemplateParser as zo, deleteIndeterminateGuards as zr, recordProvenPublicExpression as zs, withNestedRevertRun as zt };
|
|
48782
|
-
//# sourceMappingURL=deploy-engine-CZaafy9R.js.map
|
|
48922
|
+
|
|
48923
|
+
//#endregion
|
|
48924
|
+
export { markRefusedBeforeApplying as $, repairMalformedResourceEntriesForReadOnly as $a, runDockerForeground as $c, deployRefusesOrphanRowsReason as $i, isFinalSnapshotError as $n, readsNoEchoSource as $o, DiffCalculator as $r, rebuildClientForBucketRegion as $s, isJournaledOrphan as $t, diffSecurity as A, refuseMalformedOrphans as Aa, ensureAssetStorage as Ac, isUnboundTemplateParameter as Ai, PARTITION_TABLE as Al, collectPublishedOutputNames as An, requireConfigArray as Ao, isCustomResourceType as Ar, recordNestedStackParameterExpressions as As, NESTED_PENDING_PARENT_REASON as At, compensateRemovedDeletionProtection as B, refuseMalformedResourceEntriesForImportSave as Ba, describeDockerCapturedOutput as Bc, isStalePlaceholderArnAttribute as Bi, ownValue as Bl, secretNamePrintingBag as Bn, DagBuilder as Bo, UNSPECIFIED_SKIP_REASON as Br, recordNoEchoAttributeValues as Bs, collectNestedChildUnaddressed as Bt, computeImplicitDeleteEdges as C, malformedScrubResourceEntriesRefusalMessage as Ca, buildAssetRedirectMap as Cc, s3BucketRegionalDomainName as Ci, CFN_TEMPLATE_URL_LIMIT as Cl, secretSafeKeyDisplay as Cn, coerceCfnBoolean as Co, ProviderRegistry as Cr, withoutPhysicalNameCopies as Cs, dropFailedCommands as Ct, findServiceTokenRefusals as D, refuseMalformedNestedChildOutputs as Da, AssetModeResolver as Dc, producerRegionsFromState as Di, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Dl, isWholeDynamicReferenceValue as Dn, configStringRefusal as Do, waitForLambdaFunctionActive as Dr, pathCrossesDottedKey as Ds, loadJournaledOrphans as Dt, deferredServiceTokenWarning as E, refuseDivergentRecordRegionForDestroy as Ea, rewriteTemplateAssetReferences as Ec, classifyReplaySecretRegion as Ei, uploadCfnTemplate as El, exportNameSecretExposure as En, configIntegerRefusal as Eo, wouldReturnToSdkProvider as Er, isUncertifiedBaselineMaskPosition as Es, journaledOrphanLines as Et, perType as F, refuseMalformedResourceAttributesForOrphan as Fa, validateAssetBucketName as Fc, carriesFetchableDynamicReference as Fi, processStackMessages as Fl, completedReplayEntries as Fn, describeTypeWithThrottleRetry as Fo, customResourceResponseExpirationWarning as Fr, splitGetAttStringForm as Fs, nestedChildStackName as Ft, INDEX_SETTLE_POLL_INTERVAL_MS as G, refuseMalformedResourcePropertiesForOrphan as Ga, formatDockerLoginError as Gc, passedParameterClassesOf as Gi, resolveAssemblyPath as Gl, storedSecretNameNeedles as Gn, maskReadbackAtCoordinates as Go, isWaitAbandonedError as Gr, STATE_SOURCED_CROSS_GENERATION_RULES as Gs, awaitInFlightSibling as Gt, resolveDynamoDbDeleteBudgetClock as H, refuseMalformedResourcePropertiesForDestroy as Ha, describeDockerFailure as Hc, parseWebACLArn as Hi, describeFileReadFailure as Hl, secretNamedAttributeNamesOf as Hn, canonicalCoordinates as Ho, deleteLeftInPlace as Hr, recordProvenPublicExpression as Hs, withNestedStackContext as Ht, readProtection as I, refuseMalformedResourceEntries as Ia, validateContainerRepoName as Ic, isNamelessDynamicReferenceError as Ii, defineOwnKey as Il, journaledOrphanPrintingBag as In, withRetry as Io, CloudControlProvider as Ir, carriesSecretMask as Is, recordDisplacedSkips as It, ECR_AUTO_DELETE_IMAGES_TAG as J, refuseMalformedResourcesForExport as Ja, isMalformedEnvKey as Jc, STATE_REGION_DIVERGED as Ji, clearBucketRegionCache as Jl, PRE_DELETE_SNAPSHOT_TYPES as Jn, noEchoCoordinatesOf as Jo, ec2InstanceProtectionSite as Jr, WHOLE_DYNAMIC_REFERENCE_PATTERN as Js, withStackRecords as Jt, deleteTableWithIndexBusyRetry as K, refuseMalformedResourcesForDeploy as Ka, getDockerCmd as Kc, declaresNoEcho as Ki, injectAwsRegion as Kl, extractDeploymentEventError as Kn, maskWholeValue as Ko, markWaitAbandoned as Kr, STATE_SOURCED_READBACK_RULES as Ks, destroyStackRecordsView as Kt, DynamoDBGlobalTableProvider as L, refuseMalformedResourceEntriesForDeploy as La, buildDenyExternalAccessPolicy as Lc, keepsSecretReferenceToken as Li, hasOwnKey as Ll, maskEventTextWithBoundBags as Ln, canonicalLambdaFunctionName as Lo, slowCcOperationTimeoutMs as Lr, provenPublicValue as Ls, revertNestedChildFromJournal as Lt, recordedProtectionNote as M, refuseMalformedOrphansForOrphan as Ma, isCrossRegionRedirect as Mc, getAccountInfo as Mi, derivePartitionAndUrlSuffix as Ml, bindingSkippedOutputs as Mn, requireConfigString as Mo, withPrintingSecrets as Mr, physicalNameCopiesOf as Ms, displacedPhysicalIdShown as Mt, PROTECTION_PROPERTY_BY_TYPE as N, refuseMalformedOutputs as Na, parseBootstrapMarker as Nc, isImpossibleEmptyStoredAttribute as Ni, AssemblyReader as Nl, DEFAULT_RESOURCE_TIMEOUT_MS as Nn, prefetchCreateOnlyPropertyPaths as No, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as Nr, recordAttributeIdCopy as Ns, dropSettledNestedJournals as Nt, serviceTokenBlockingReason as O, refuseMalformedOrphanRecords as Oa, BOOTSTRAP_MARKER_PREFIX as Oc, regionLessSecretName as Oi, decodeListingKey as Ol, noEchoParameterValueSeed as On, readConfigString as Oo, TemplateNoEchoReresolver as Or, identityKeyFor as Os, makeForeignHolderScan as Ot, isProtectionValueActive as P, refuseMalformedOutputsForDestroy as Pa, readBootstrapMarkerBody as Pc, carriesDynamicReference as Pi, StageLoadError as Pl, DEFAULT_RESOURCE_WARN_AFTER_MS as Pn, templateResourceTypes as Po, applyCustomResourceResponseExpiration as Pr, recordPhysicalNameCopy as Ps, getNestedRevertRun as Pt, getPriorAttempts as Q, repairMalformedOutputsForReadOnly as Qa, redactedDockerCause as Qc, accountArgs as Qi, effectiveDeletionPolicy as Qn, readbackPathFor as Qo, reEnableInstanceApiTermination as Qr, S3StateBackend as Qs, demoteSupersededOrphans as Qt, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as R, refuseMalformedResourceEntriesForDestroy as Ra, buildDockerImage as Rc, AWS_NO_VALUE as Ri, hasPlainPrototype$1 as Rl, namingSecretsWithRecordedNoEcho as Rn, lambdaFunctionNameForMask as Ro, unchangedBehindSecretReference as Rr, recordMaskOnlyValue as Rs, revertedNestedRowIds as Rt, IMPLICIT_DELETE_DEPENDENCIES as S, malformedResourcesWarning as Sa, WorkGraph as Sc, s3BucketDualStackDomainName as Si, CFN_TEMPLATE_BODY_LIMIT as Sl, secretBearingStateKeyWarning as Sn, toFiniteNumber as So, CC_BROKEN_REASON as Sr, withPhysicalNameCopies as Ss, deleteJournaledOrphans as St, recordRetainedForReadoption as T, previewableOrphanRecords as Ta, loadPublishableAssetManifest as Tc, classifyRecordedSecretRegion as Ti, findLargeInlineResources as Tl, exportNameNoEchoParameters as Tn, configBooleanRefusal as To, isCustomResource as Tr, dynamicReferenceTokens as Ts, isHandledOrphan as Tt, resolveDynamoDbDeleteBudgetMs as U, refuseMalformedResourcePropertiesForDrift as Ua, dockerSpawnEnvWithSensitive as Uc, withSharedDrainBudget as Ui, displayAssemblyPath as Ul, secretNamedRecordNeedles as Un, isMarkedCoordinate as Uo, deleteSkipReason as Ur, wholeStringLeavesOf as Us, replayFailedOperations as Ut, deleteBudgetKey as V, refuseMalformedResourceEntriesForOrphan as Va, describeDockerExecFailure as Vc, refStateLookupFromResource as Vi, absoluteAssemblyPathEscape as Vl, secretNamePrintingBags as Vn, TemplateParser as Vo, deleteIndeterminateGuards as Vr, recordNoEchoParameterFreshValue as Vs, getCurrentNestedStackContext as Vt, DELETE_INDEX_WAIT_PROCEED_NOTE as W, refuseMalformedResourcePropertiesForExport as Wa, finchSecretArgvRefusal as Wc, parameterInputsFor as Wi, renderAssemblyPathEscape as Wl, stateSecretNameNeedles as Wn, maskAtCoordinates as Wo, withIndeterminateGuard as Wr, STATE_SOURCED_BASELINE_RULES as Ws, replayRollback as Wt, hasCdkAutoDeleteTag as X, repairMalformedOrphanRecordsForReadOnly as Xa, redactDockerArgvValues as Xc, UNREADABLE_ORPHANS_CONTAINER_ROW as Xi, ccRoutedFinalSnapshotError as Xn, noEchoOutputsComparison as Xo, observeThenDisableInstanceApiTermination as Xr, LockManager as Xs, replacedDeleteFailureVerdict as Xt, S3_AUTO_DELETE_OBJECTS_TAG as Y, refuseMalformedState as Ya, partitionSensitiveEnv as Yc, STATE_RESOURCES_MALFORMED as Yi, resolveBucketRegion as Yl, buildFinalSnapshotIdentifier as Yn, noEchoLeavesOf as Yo, isTerminationProtectionPropagationError as Yr, isSingleDynamicReferenceToken as Ys, removeProtectionTypeList as Yt, isTruthyCfnBoolean as Z, repairMalformedOrphansForReadOnly as Za, redactedCause as Zc, UNREADABLE_RESOURCES_MAP_ROW as Zi, createPreDeleteFinalSnapshot as Zn, passedNoEchoParametersOf as Zo, reDisableInstanceApiTermination as Zr, isLockInfoExpired as Zs, recordAfterRollbackUpdate as Zt, makeCanonicalizePropertiesFn as _, malformedOutputsRefusalMessage as _a, orphansCarriedFrom as _c, outputReferenceProvenanceOf as _i, resolveStateBucketWithDefaultAndSource as _l, orphanNeedsIdentity as _n, renderStatefulReason as _o, refuseMalformedDesiredTags as _r, markSameGenerationBag as _s, planOrphanAdoption as _t, findNestedTemplateTreeDefect as a, isReadableResourceEntry as aa, isNotImplemented as ac, applyRoleArnIfSet as ai, AssetManifestLoader as al, replacementNeverSwapped as an, withheldAccountClause as ao, formatDestructiveChange as ar, hasMaskableValues as as, red as at, lookupEachName as b, malformedResourceEntriesWarning as ba, isSensitiveAttributeName as bc, s3BucketArn as bi, warnDeprecatedNoPrefixCliFlag as bl, exportAliasCollisionScrubWarning as bn, isWarmThroughputDecrease as bo, definedAttributes as br, redactSecretsForState as bs, pendingRequestCount as bt, renderNestedTemplateTreeDefect as c, malformedExportSourceWarning as ca, describeRegionValueKind as cc, explicitRoleArnOrThrow as ci, synthesisStatusMessage as cl, findNestedStackTypeChanges as cn, unwrittenCreateOnlyReplacement as co, reserveStackCreateToken as cr, printingCorpusOf as cs, namesAnyDeclaredParameter as ct, conditionInputsFrom as d, malformedLocalResourcesWarning as da, hasReasonlessBaselineRefusal as dc, AWS_CREDENTIAL_ENV_KEYS as di, loadCdkJson as dl, REDACTED_DELETE_ADDRESS_SKIP_REASON as dn, hasNoCloudControlHandlers as do, isRefusedByName as dr, shareLogOnlyValues as ds, noEchoAttributeNamesOf as dt, displayLogicalId as ea, CrossPrefixReadError as ec, INTRINSIC_KEYS as ei, runDockerStreaming as el, isReplacementOrphan as en, repairMalformedResourcePropertiesForReadOnly as eo, refusesFinalSnapshot as er, recordedNoEchoValuesOf as es, formatResourceLine as et, parentSuppliedValues as f, malformedOrphanRecordsRefusalMessage as fa, hasUnverifiableParameterRefusal as fc, applyCallerIdentityCredentials as fi, resolveApp as fl, isRedactedRecordedValue as fn, findReplacedReadersOfRecreateTargets as fo, markDeleteStarted as fr, unionOfSecretBags as fs, noEchoComparisonForTemplate as ft, mergeNoChangeOutputs as g, malformedOrphansWarning as ga, orphansAfterRollback as gc, keepHeldTokenProvenance as gi, resolveStateBucketWithDefault as gl, updatePartialReason as gn, isStatefulRecreateTargetSync as go, readTagList as gr, maskSecretsInText as gs, makeSiblingClaimReader as gt, keptWholeReasonText as h, malformedOrphansRefusalMessage as ha, isReadableBag as hc, isSettledInstanceState as hi, resolveSkipPrefix as hl, updatePartialMessage as hn, isStatefulRecreateTargetForReplace as ho, planTagDiff as hr, maskSecretsInError as hs, createReadOnlyAttributeHealerFactory as ht, childTemplateLoader as i, isReadableOrphanRecord as ia, isAccessDenied$1 as ic, refuseUnreadableCdkCrossAccountRefs as ii, stripForDisplay as il, recordUnderIdIsNotOwn as in, unreadableResourceEntries as io, findDestructiveChanges as ir, createUnionSecretMasker as is, green as it, recordedProtectionEvidence as j, refuseMalformedOrphansForDestroy as ja, getBootstrapMarkerKey as jc, parameterTypeMayLoseSecretIdentity as ji, canonicalizeRegion as jl, isExportAliasCollision as jn, requireConfigObject as jo, getCurrentResourceSecrets as jr, recoverMaskedOutput as js, displacedOpClause as jt, withResourceDeadline as k, refuseMalformedOrphanRecordsForDestroy as ka, assertAssetBucketRegion as kc, coerceParameterTypedValue as ki, expectedOwnerParam as kl, collectDeclaredOutputNames as kn, replayWarn as ko, readsNoEchoDeleteValues as kr, inheritNestedStackParameterAssociations as ks, sameJournaledOrphans as kt, templateIdentity as l, malformedLocalOutputsWarning as la, exportNamesCarriedFrom as lc, isIamRoleArn as li, getDefaultStateBucketName as ll, getCurrentProducerRegions as ln, withoutSilentDropProperties as lo, withCreateTokenLedger as lr, recordLogOnlyParameterValue as ls, reachableDivergentParameters as lt, isSecretBearingReferenceString as m, malformedOrphanRowsKeptWarning as ma, importableOutputs as mc, envCredentialsAreAssumedRole as mi, resolveCaptureObservedState as ml, redactedDeleteAddressSkip as mn, MULTI_REGION_RECREATE_BLOCKED_TYPES as mo, DBPROXY_TAG_OPTIONS as mr, errorCauseChain as ms, noEchoParameterNamesOf as mt, crossStackOutputProvenanceSource as n, hasReadableOutputs as na, applyCrossPrefixScan as nc, poisonRenderedSpellingsCollidingIn as ni, escapeRegExp$3 as nl, planRollback as nn, unpreviewableOrphanRecords as no, maskingRetryLogger as nr, liveMatchesUnresolvedTokenFrame as ns, cyan as nt, isAbsoluteAssetPath as o, malformedDriftResourcePropertiesWarning as oa, splitImportedOps as oc, assertFlagRoleArn as oi, getDockerImageBySourceHash as ol, resolveReplacementOldType as on, findActionableSilentDrops as oo, earliestDefined as or, literalSplitDelimitersOf as os, yellow as ot, readRecordedConditionVerdicts as p, malformedOrphanRecordsWarning as pa, importableOutputKeys as pc, callerEnvCredentials as pi, resolveAutoAssetStorage as pl, redactedDeleteAddressFields as pn, shownType as po, DBPROXY_TAGS_WHAT as pr, createSecretMasker as ps, noEchoExactEchoLeavesOf as pt, waitForIndexesSettled as q, refuseMalformedResourcesForDestroy as qa, isDockerClientEnvKey as qc, JSON_LISTING_HOLE_VALUE as qi, injectedAwsRegionValue as ql, ATOMIC_FINAL_SNAPSHOT_TYPES as qn, maskedLeafCoordinatesOf as qo, disableInstanceApiTermination as qr, TEMPLATE_SOURCED_RULES as qs, getStackRecords as qt, inheritedProvenanceForChildDiff as r, hasReadableResources as ra, crossPrefixDeniedWarning as rc, producerLookupOver as ri, stripControlChars as rl, recheckFailedPlan as rn, unreadableOrphanRecords as ro, constructPathOf as rr, carryLogOnlyValues as rs, gray as rt, listNestedTemplateRows as s, malformedExportNamesWarning as sa, acceptedCreateOnlyDropsOf as sc, assertSendableRoleArn as si, Synthesizer as sl, seedsDeleteFirstGuard as sn, findSilentDropProperties as so, ledgerForStack as sr, logOnlyValueCount as ss, computeParameterTaint as st, DeployEngine as t, hasReadableOrphans as ta, CrossPrefixScanCache as tc, IntrinsicFunctionResolver as ti, warnFinchArgvExposure as tl, planFailedOps as tn, repairMalformedResourcesForReadOnly as to, unsupportedFinalSnapshotError as tr, valueAtCoordinate as ts, bold as tt, conditionFingerprint as u, malformedLocalResourceEntriesWarning as ua, hasReadableExportSet as uc, sendableAssumeRoleCommand as ui, getLegacyStateBucketName as ul, inheritProducerRegions as un, NO_CC_HANDLERS_REASON as uo, acquireIdempotencyToken as ur, recordLogOnlyValue as us, resourcesNamingDeclaredParameter as ut, chunks as v, malformedOutputsWarning as va, shouldRetainResource as vc, recordedOutputReferenceRegions as vi, resolveUseCdkBootstrapAssets as vl, WITHHELD_NAME_DISPLAY as vn, WARM_THROUGHPUT_MEMBERS as vo, tagMapAsList as vr, recordReferenceProvenanceEntry as vs, DeploymentEventsReader as vt, keptForReadoption as w, malformedStateRefusalMessage as wa, createAssetRedirectResolver as wc, s3BucketWebsiteUrl as wi, MIGRATE_TMP_PREFIX as wl, carriedExportAliasExposure as wn, coerceCfnInteger as wo, ccBrokenReason as wr, DYNAMIC_REFERENCE_TOKEN_SCAN as ws, dropFailedHint as wt, withApiLimit as x, malformedResourcePropertiesWarning as xa, stringifyValue as xc, s3BucketDomainName as xi, ssmResolvedValueType as xl, secretBearing as xn, toCfnInteger as xo, stringifyIfAssigned as xr, scrubResourceRecord as xs, resolvePendingCloudControlRequests as xt, isAccessDeniedError as y, malformedRenderedContainersWarning as ya, AssetPublisher as yc, recordedReferenceRegions as yi, stateBucketExistenceConfirmed as yl, displayTextOrWithheld as yn, coerceWarmThroughput as yo, tagPlanWarning as yr, snapshotPassProvenance as ys, DeploymentEventsStore as yt, beginDeleteWait as z, refuseMalformedResourceEntriesForImport as za, resolveDockerContextDirectory as zc, cfnRefValueFromPhysicalId as zi, nullPrototypeRecord as zl, orphanRecordsPrintingBag as zn, sameLambdaFunctionAddress as zo, RollbackInlinePolicyWriters as zr, recordMaskOnlyValuesIn as zs, withNestedRevertRun as zt };
|
|
48925
|
+
//# sourceMappingURL=deploy-engine-BIPU9Xdh.js.map
|