@intentius/chant-lexicon-terraform 0.124.102 → 0.124.104

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.
@@ -247,6 +247,12 @@ export const TERRAFORM_REFERENCE_CATALOG = {
247
247
  // and project, or the ARN's role name, so these only make them findable.
248
248
  { kind: "google_service_account", ids: ["account_id"] },
249
249
  { kind: "aws_iam_role", ids: ["name"] },
250
+ // Named by a literal in the block that uses them (#5340): the value a
251
+ // roster node's `db_subnet_group_name`, `subnet_group_name` or
252
+ // `function_name` carries.
253
+ { kind: "aws_db_subnet_group", ids: ["name"] },
254
+ { kind: "aws_elasticache_subnet_group", ids: ["name"] },
255
+ { kind: "aws_lambda_function", ids: ["function_name"] },
250
256
  ],
251
257
  refs: [
252
258
  // ── containment (→ boundary pairs, and containment edges) ──
@@ -24,6 +24,15 @@ export declare function plannerForBinary(binary: string | undefined): ChangeSetP
24
24
  * disruption ({@link disruptionFor}).
25
25
  */
26
26
  export declare function actionFor(actions: unknown): ChangeSetAction;
27
+ /**
28
+ * The disruption one `resource_changes[]` entry's `actions` mean (#5338):
29
+ * `update` is in place, `create, delete` a replacement made first, `delete,
30
+ * create` and `delete` destroy. Undefined for a create, a read, a no-op or a
31
+ * forget, which change nothing that exists. `classifyDisruption`
32
+ * (`./disruption.ts`) reads the same table, so the change set and the
33
+ * lifecycle plan agree.
34
+ */
35
+ export declare function terraformActionsDisruption(actions: unknown): "in-place" | "replace" | "destroy" | undefined;
27
36
  /** A resource address's module path, name and index, read off the address when the entry does not carry them. */
28
37
  export declare function parseTerraformAddress(address: string): {
29
38
  module?: string;
@@ -69,13 +69,26 @@ export function actionFor(actions) {
69
69
  }
70
70
  throw new Error(`a plan entry has actions ${JSON.stringify(actions)}, which the change set has no action for`);
71
71
  }
72
- function disruptionFor(actions, action) {
73
- switch (action) {
74
- case "update": return "in-place";
75
- case "delete": return "destroy";
76
- case "replace": return actions[0] === "create" ? "replace" : "destroy";
77
- default: return undefined;
78
- }
72
+ /**
73
+ * The disruption one `resource_changes[]` entry's `actions` mean (#5338):
74
+ * `update` is in place, `create, delete` a replacement made first, `delete,
75
+ * create` and `delete` destroy. Undefined for a create, a read, a no-op or a
76
+ * forget, which change nothing that exists. `classifyDisruption`
77
+ * (`./disruption.ts`) reads the same table, so the change set and the
78
+ * lifecycle plan agree.
79
+ */
80
+ export function terraformActionsDisruption(actions) {
81
+ const a = Array.isArray(actions) ? actions.map(String) : [];
82
+ if (a.length === 1 && a[0] === "update")
83
+ return "in-place";
84
+ if (a.length === 1 && a[0] === "delete")
85
+ return "destroy";
86
+ if (a.length === 2 && a.includes("create") && a.includes("delete"))
87
+ return a[0] === "create" ? "replace" : "destroy";
88
+ return undefined;
89
+ }
90
+ function disruptionFor(actions, _action) {
91
+ return terraformActionsDisruption(actions);
79
92
  }
80
93
  /** A resource address's module path, name and index, read off the address when the entry does not carry them. */
81
94
  export function parseTerraformAddress(address) {
@@ -1,20 +1,3 @@
1
- /**
2
- * The floors of the terraform lexicon's parts (#4916): for each part a
3
- * product may feature-detect on, the first release of
4
- * `@intentius/chant-lexicon-terraform` that has it. Each package has its own
5
- * version (#5138), so these are versions of the terraform lexicon, not of
6
- * chant core. chant core's floor table (`@intentius/chant/floor-table`)
7
- * lists them beside core's with the package each belongs to, and `chant dev
8
- * dead-guards` reads them against a product's pin on the lexicon.
9
- *
10
- * Only this file is read for the table: the `_FLOOR` constants elsewhere in
11
- * the lexicon name versions of other tools (`NEXUS_HOSTED_FLOOR` in
12
- * ./registry/targets/nexus.ts is a Nexus version). The entries that serve a
13
- * part re-export its floor by name, so the table names those subpaths too.
14
- *
15
- * This file imports nothing, so an entry that must stay light (./module-catalog)
16
- * can re-export from it.
17
- */
18
1
  /**
19
2
  * The first terraform lexicon release that has `moduleConsumers`, the scan of
20
3
  * every registry module call a root makes, with `readRegistryCatalog` and
@@ -29,3 +12,34 @@ export declare const MODULE_CONSUMERS_FLOOR = "0.124.55";
29
12
  export declare const USED_SOURCES_FLOOR = "0.124.55";
30
13
  /** The first terraform lexicon release that has `./module-catalog`, the known-module catalog TF047 reads (#4560). */
31
14
  export declare const MODULE_CATALOG_FLOOR = "0.124.55";
15
+ /**
16
+ * The first terraform lexicon release whose `classifyDisruption` classifies a
17
+ * planned update from the plan's actions (in place, replace, destroy), with
18
+ * `terraformDisruptionQueries` for a plan in hand, and whose `healthTargets`
19
+ * reads a root's covered resources through the aws, azure and gcp health
20
+ * reads with ids from its state (#5338).
21
+ */
22
+ export declare const TERRAFORM_HEALTH_DISRUPTION_FLOOR = "0.124.103";
23
+ /**
24
+ * The first terraform lexicon release that puts `facts.ownershipRows` on a
25
+ * choudoufu live root's nodes (#5402): `live-plan`'s `bound[].source`,
26
+ * `identity_values`, omission and adoption rows, `live-graph`'s
27
+ * `meta.engineGraph.gaps`, and with `CHANT_TERRAFORM_LIVE_LISTING=1`,
28
+ * `live-ls`'s `gaps[]` and `listed`. It needs `@intentius/chant` at
29
+ * `ENGINE_OWNERSHIP_ROWS_FLOOR` or later.
30
+ */
31
+ export declare const TERRAFORM_OWNERSHIP_ROWS_FLOOR = "0.124.103";
32
+ /**
33
+ * The first terraform lexicon release that reports a choudoufu live root's
34
+ * bound objects no block declares as live nodes (#5429): each `live-plan`
35
+ * `bound[]` address no declared block answers for, and with
36
+ * `CHANT_TERRAFORM_LIVE_LISTING=1` each `live-ls` item with `declared: false`,
37
+ * with choudoufu's resource type as its kind, status `orphan`, and
38
+ * `boundBy`, `listed` and `gaps` under `facts.ownershipRows`. It needs
39
+ * `@intentius/chant` at `UNDECLARED_LIVE_NODES_FLOOR` or later to draw them.
40
+ */
41
+ export declare const TERRAFORM_UNDECLARED_NODES_FLOOR = "0.124.103";
42
+ /**
43
+ * The first terraform lexicon release whose roots publish `stateLocations` on their graph meta, so `chant workspace state` says where a root's state lives: the backend block with the `-backend-config` files, pairs and `TF_CLI_ARGS` flags over it (s3 with its lockfile or DynamoDB table, gcs, azurerm, http, local, cloud), the root's estate or workspace as its environment, and the record store of a choudoufu live block (#5456).
44
+ */
45
+ export declare const TERRAFORM_STATE_LOCATIONS_FLOOR = "0.124.104";
@@ -1,20 +1,3 @@
1
- /**
2
- * The floors of the terraform lexicon's parts (#4916): for each part a
3
- * product may feature-detect on, the first release of
4
- * `@intentius/chant-lexicon-terraform` that has it. Each package has its own
5
- * version (#5138), so these are versions of the terraform lexicon, not of
6
- * chant core. chant core's floor table (`@intentius/chant/floor-table`)
7
- * lists them beside core's with the package each belongs to, and `chant dev
8
- * dead-guards` reads them against a product's pin on the lexicon.
9
- *
10
- * Only this file is read for the table: the `_FLOOR` constants elsewhere in
11
- * the lexicon name versions of other tools (`NEXUS_HOSTED_FLOOR` in
12
- * ./registry/targets/nexus.ts is a Nexus version). The entries that serve a
13
- * part re-export its floor by name, so the table names those subpaths too.
14
- *
15
- * This file imports nothing, so an entry that must stay light (./module-catalog)
16
- * can re-export from it.
17
- */
18
1
  /**
19
2
  * The first terraform lexicon release that has `moduleConsumers`, the scan of
20
3
  * every registry module call a root makes, with `readRegistryCatalog` and
@@ -29,3 +12,34 @@ export const MODULE_CONSUMERS_FLOOR = "0.124.55";
29
12
  export const USED_SOURCES_FLOOR = "0.124.55";
30
13
  /** The first terraform lexicon release that has `./module-catalog`, the known-module catalog TF047 reads (#4560). */
31
14
  export const MODULE_CATALOG_FLOOR = "0.124.55";
15
+ /**
16
+ * The first terraform lexicon release whose `classifyDisruption` classifies a
17
+ * planned update from the plan's actions (in place, replace, destroy), with
18
+ * `terraformDisruptionQueries` for a plan in hand, and whose `healthTargets`
19
+ * reads a root's covered resources through the aws, azure and gcp health
20
+ * reads with ids from its state (#5338).
21
+ */
22
+ export const TERRAFORM_HEALTH_DISRUPTION_FLOOR = "0.124.103";
23
+ /**
24
+ * The first terraform lexicon release that puts `facts.ownershipRows` on a
25
+ * choudoufu live root's nodes (#5402): `live-plan`'s `bound[].source`,
26
+ * `identity_values`, omission and adoption rows, `live-graph`'s
27
+ * `meta.engineGraph.gaps`, and with `CHANT_TERRAFORM_LIVE_LISTING=1`,
28
+ * `live-ls`'s `gaps[]` and `listed`. It needs `@intentius/chant` at
29
+ * `ENGINE_OWNERSHIP_ROWS_FLOOR` or later.
30
+ */
31
+ export const TERRAFORM_OWNERSHIP_ROWS_FLOOR = "0.124.103";
32
+ /**
33
+ * The first terraform lexicon release that reports a choudoufu live root's
34
+ * bound objects no block declares as live nodes (#5429): each `live-plan`
35
+ * `bound[]` address no declared block answers for, and with
36
+ * `CHANT_TERRAFORM_LIVE_LISTING=1` each `live-ls` item with `declared: false`,
37
+ * with choudoufu's resource type as its kind, status `orphan`, and
38
+ * `boundBy`, `listed` and `gaps` under `facts.ownershipRows`. It needs
39
+ * `@intentius/chant` at `UNDECLARED_LIVE_NODES_FLOOR` or later to draw them.
40
+ */
41
+ export const TERRAFORM_UNDECLARED_NODES_FLOOR = "0.124.103";
42
+ /**
43
+ * The first terraform lexicon release whose roots publish `stateLocations` on their graph meta, so `chant workspace state` says where a root's state lives: the backend block with the `-backend-config` files, pairs and `TF_CLI_ARGS` flags over it (s3 with its lockfile or DynamoDB table, gcs, azurerm, http, local, cloud), the root's estate or workspace as its environment, and the record store of a choudoufu live block (#5456).
44
+ */
45
+ export const TERRAFORM_STATE_LOCATIONS_FLOOR = "0.124.104";
@@ -151,7 +151,7 @@ import { PlanShapeMovedError, planShapeDifferences, planShapeDigest, } from "@in
151
151
  import { computePlanDigest } from "@intentius/chant/lifecycle/plan-digest";
152
152
  import { terraformResourceDigests } from "../plan-digest.js";
153
153
  import { ownPackageVersion } from "@intentius/chant/components/capability-plugin";
154
- import { choudoufuMemberOutputs, choudoufuMemberPlanSet, choudoufuPlanSet, choudoufuWaveApply, choudoufuWaveRoot, asUpstreamCommands, terraformApply, terraformInit, terraformOutputs, terraformPlan, withTerraformCommandHook, } from "../op/activities/terraform.js";
154
+ import { choudoufuMemberOutputs, choudoufuMemberPlanSet, choudoufuPlanSet, choudoufuWaveApply, choudoufuWaveRoot, asUpstreamCommands, terraformApply, terraformInit, terraformMarkedOutputs, terraformOutputs, terraformPlan, withTerraformCommandHook, } from "../op/activities/terraform.js";
155
155
  import { terraformPlanMoved } from "../exit-codes.js";
156
156
  import { terraformPlanShape } from "../plan-shape.js";
157
157
  import { plannerForBinary, terraformChangeSetPart } from "../change-set.js";
@@ -573,6 +573,7 @@ export function terraformApplyCapabilityWith(deps = {}) {
573
573
  plan: (ctx, step) => withTerraformCommandHook(hook, scope("plan", step), () => cap.plan(ctx, step)),
574
574
  run: (ctx, step) => withTerraformCommandHook(hook, scope("run", step), () => cap.run(ctx, step)),
575
575
  outputs: (ctx, step) => withTerraformCommandHook(hook, scope("outputs", step), () => cap.outputs(ctx, step)),
576
+ markedOutputs: (ctx, step) => withTerraformCommandHook(hook, scope("outputs", step), () => cap.markedOutputs(ctx, step)),
576
577
  planGroup: (ctx, members) => withTerraformCommandHook(hook, groupScope("plan", members), () => cap.planGroup(ctx, members)),
577
578
  runGroup: (ctx, run, members) => withTerraformCommandHook(hook, groupScope("run", members), () => cap.runGroup(ctx, run, members)),
578
579
  };
@@ -653,6 +654,13 @@ function terraformApplyMethods(deps) {
653
654
  await initRoot(input, ctx.processEnv, ctx.serial);
654
655
  return terraformOutputs(rootArgs(input, ctx.processEnv));
655
656
  },
657
+ // #5345: the same read with the outputs `sensitive = true` marks, which a replan keeps no digest of.
658
+ async markedOutputs(ctx, step) {
659
+ const input = await filledInput(deps.resolveRoot, ctx, step);
660
+ requireRoot(input);
661
+ await initRoot(input, ctx.processEnv, ctx.serial);
662
+ return terraformMarkedOutputs(rootArgs(input, ctx.processEnv));
663
+ },
656
664
  // #4447 (ws-107): a group core forms of components that read each other plans and applies as one composed run
657
665
  // when `terraform.compose.enabled` is set (./compose-group.ts). Delegates, so the methods are read when called.
658
666
  groupReads: (ctx, members) => group.groupReads(ctx, members),
@@ -7,6 +7,14 @@
7
7
  * const spec = { ..., step: { kind: "terraform-apply", root: "{target}" }, holds: { cost: terraformCostHold({ approveAbove: 100 }) } };
8
8
  * ```
9
9
  *
10
+ * infracost reads a copy of the plan document with its sensitive values
11
+ * replaced by `[redacted]` and runs without the forge tokens in its
12
+ * environment. `redactEnv` names variables whose values are secret though the
13
+ * plan does not mark them (a product's store values): each value is replaced
14
+ * in the copy and the variable leaves infracost's environment. `dropEnv`
15
+ * names more variables to leave out, such as a product's own token variables.
16
+ * Both take names; the job's environment holds the values.
17
+ *
10
18
  * The shape is core's `OpWaveCostHold`, written out here so the lexicon
11
19
  * builds against a core without it.
12
20
  */
@@ -17,10 +25,14 @@ export interface TerraformCostHold {
17
25
  approveAbove: number;
18
26
  format: "infracost";
19
27
  currency?: string;
28
+ redactEnv?: string[];
29
+ dropEnv?: string[];
20
30
  }
21
31
  /** A cost hold that prices each root with infracost, waiting over `approveAbove` a month. `command` replaces infracost's argv; it must name `{planJson}`. */
22
32
  export declare function terraformCostHold(options: {
23
33
  approveAbove: number;
24
34
  currency?: string;
25
35
  command?: string[];
36
+ redactEnv?: string[];
37
+ dropEnv?: string[];
26
38
  }): TerraformCostHold;
package/dist/cost-hold.js CHANGED
@@ -7,15 +7,34 @@
7
7
  * const spec = { ..., step: { kind: "terraform-apply", root: "{target}" }, holds: { cost: terraformCostHold({ approveAbove: 100 }) } };
8
8
  * ```
9
9
  *
10
+ * infracost reads a copy of the plan document with its sensitive values
11
+ * replaced by `[redacted]` and runs without the forge tokens in its
12
+ * environment. `redactEnv` names variables whose values are secret though the
13
+ * plan does not mark them (a product's store values): each value is replaced
14
+ * in the copy and the variable leaves infracost's environment. `dropEnv`
15
+ * names more variables to leave out, such as a product's own token variables.
16
+ * Both take names; the job's environment holds the values.
17
+ *
10
18
  * The shape is core's `OpWaveCostHold`, written out here so the lexicon
11
19
  * builds against a core without it.
12
20
  */
13
21
  /** infracost's own command over one plan document. */
14
22
  export const INFRACOST_ARGV = ["infracost", "breakdown", "--path", "{planJson}", "--format", "json", "--log-level", "error"];
23
+ /** Names of environment variables only, so no secret value sits in the spec. */
24
+ const ENV_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
25
+ function envNames(option, names) {
26
+ if (names === undefined)
27
+ return undefined;
28
+ if (!Array.isArray(names) || !names.every((n) => typeof n === "string" && ENV_NAME.test(n)))
29
+ throw new Error(`terraformCostHold: ${option} is a list of environment variable names, never their values`);
30
+ return names;
31
+ }
15
32
  /** A cost hold that prices each root with infracost, waiting over `approveAbove` a month. `command` replaces infracost's argv; it must name `{planJson}`. */
16
33
  export function terraformCostHold(options) {
17
34
  const command = options.command ?? [...INFRACOST_ARGV];
18
35
  if (!command.some((a) => a.includes("{planJson}")))
19
36
  throw new Error("terraformCostHold: the command must name {planJson}, the root's plan document");
20
- return { command, approveAbove: options.approveAbove, format: "infracost", ...(options.currency ? { currency: options.currency } : {}) };
37
+ const redactEnv = envNames("redactEnv", options.redactEnv);
38
+ const dropEnv = envNames("dropEnv", options.dropEnv);
39
+ return { command, approveAbove: options.approveAbove, format: "infracost", ...(options.currency ? { currency: options.currency } : {}), ...(redactEnv ? { redactEnv } : {}), ...(dropEnv ? { dropEnv } : {}) };
21
40
  }
@@ -239,7 +239,7 @@
239
239
  import type { DescribeResourcesResult, ResourceMetadata, TeardownEnumeration } from "@intentius/chant/lexicon";
240
240
  import { type DeclaredEntity, type UnobservedReason } from "@intentius/chant/observation";
241
241
  import type { OwnershipMarker } from "@intentius/chant/ownership";
242
- import type { EngineFacts } from "@intentius/chant/engine-facts";
242
+ import { type EngineFacts, type EngineOwnershipRows } from "@intentius/chant/engine-facts";
243
243
  import type { IREdge } from "@intentius/chant/graph-ir";
244
244
  import { choudoufuLiveGraph, choudoufuLiveLs, choudoufuLivePlanDocument, terraformInit, terraformPlanRead, terraformShow } from "./op/activities/terraform.js";
245
245
  import type { TerraformObserveDepth } from "./config.js";
@@ -291,6 +291,8 @@ export interface LivePlanBoundRow {
291
291
  identity?: string;
292
292
  /** Which admission path supplied the identity: `marker`, `record`, `derived` or `cache`. */
293
293
  source?: string;
294
+ /** `identity_values`: the values that identify the bound object, by argument (#5402). */
295
+ identityValues?: Record<string, string>;
294
296
  }
295
297
  /** One `omissions[]` entry: a declared instance the plan could not read, and why. */
296
298
  export interface LivePlanOmissionRow {
@@ -310,6 +312,8 @@ export interface LivePlanUnownedRow {
310
312
  adoptEstate?: string;
311
313
  /** `adopt_tofu_address`: the escaped address the adopting tag write would carry. */
312
314
  adoptAddress?: string;
315
+ /** `adopt_command`, or `hint`: the one-line write choudoufu composed, when it printed one (#5402). */
316
+ adoptCommand?: string;
313
317
  }
314
318
  /**
315
319
  * One `adoptable[]` entry: a live resource the estate-wide sweep matched to a
@@ -328,6 +332,7 @@ export interface LivePlanAdoptableRow {
328
332
  identity?: string;
329
333
  adoptEstate?: string;
330
334
  adoptAddress?: string;
335
+ adoptCommand?: string;
331
336
  /** `matched[]`: the arguments the declaration and the live resource agreed on exactly. */
332
337
  matched?: Array<{
333
338
  attribute: string;
@@ -359,6 +364,15 @@ export interface LivePlanIndex {
359
364
  * degrade to "this section said nothing", never to a throw.
360
365
  */
361
366
  export declare function indexLivePlan(document: unknown): LivePlanIndex;
367
+ /**
368
+ * The rows behind each address's ownership (#5402), by the address
369
+ * `live-plan` printed: `bound[]`'s source and `identity_values`, the
370
+ * omission, and the adoption an `unowned[]` or `adoptable[]` row offers. With
371
+ * a `live-ls` listing, also its `gaps[]` (read `listing`, the rung as the
372
+ * reason) and, on a bound address, whether the listing holds it under the
373
+ * estate's marker. An address with none of these is left out.
374
+ */
375
+ export declare function ownershipRowsByAddress(index: LivePlanIndex, listing?: LiveLsListing): Map<string, EngineOwnershipRows>;
362
376
  /**
363
377
  * Every instance address in the document belonging to the declared block
364
378
  * `address`. Exported for the behaviour request builder (`./behaviour/`,
@@ -397,9 +411,9 @@ export declare function classifyLiveInstance(address: string, index: LivePlanInd
397
411
  * The environment variable that asks for each live root's `live-plan -json`
398
412
  * document as a file, in a directory the caller owns (behold#924).
399
413
  *
400
- * The overlay keeps chant's verdict per block and drops the rows behind it:
401
- * each instance's omission reason and detail, `identity_values`, the adoptable
402
- * row's own fields. A caller that paints ownership from those rows and wants
414
+ * The overlay keeps chant's verdict per block; the rows behind it (each
415
+ * instance's omission reason and detail, `identity_values`, the adoptable
416
+ * row's own fields) ride on each node's `facts.ownershipRows` (#5402). A caller that paints ownership from those rows and wants
403
417
  * the plan's attributes from the plan depth would otherwise run its own
404
418
  * `live-plan` beside this one, two refreshes of the estate that can disagree
405
419
  * (choudoufu #1014). With this set to an absolute directory, the document this
@@ -419,6 +433,8 @@ export interface EngineGraphRead {
419
433
  blocks: Map<string, EngineFacts>;
420
434
  /** Facts of an instance node, by its block's entity key, then by the instance address. */
421
435
  instances: Map<string, Map<string, EngineFacts>>;
436
+ /** Each instance address's node id, as `observedInstanceNodeId` gives it and the declared graph draws it (#5333). */
437
+ instanceNodes: Map<string, string>;
422
438
  /** Edges with a grain, endpoints as live graph node ids. */
423
439
  edges: IREdge[];
424
440
  }
@@ -432,9 +448,13 @@ export interface EngineGraphRead {
432
448
  * the configuration reads, `estate:<name>`) has no chant entity, so its
433
449
  * edges are left out. Edges keep their grain; one without a grain is left out.
434
450
  *
451
+ * Each node's facts also carry its `ownershipRows` (#5402): `rows`, by the
452
+ * address `live-plan` printed (`ownershipRowsByAddress`), and the
453
+ * document's own `meta.engineGraph.gaps` entry for the node, read `graph`.
454
+ *
435
455
  * Throws when the document is not an engine graph document.
436
456
  */
437
- export declare function readEngineGraph(root: string, document: unknown): EngineGraphRead;
457
+ export declare function readEngineGraph(root: string, document: unknown, rows?: ReadonlyMap<string, EngineOwnershipRows>): EngineGraphRead;
438
458
  /**
439
459
  * `resources` with {@link readEngineGraph}'s facts on them: a block's on
440
460
  * `ResourceMetadata.facts`, an instance's on its `instances` entry of the
@@ -442,6 +462,42 @@ export declare function readEngineGraph(root: string, document: unknown): Engine
442
462
  * read did not return.
443
463
  */
444
464
  export declare function withEngineFacts(resources: Record<string, ResourceMetadata>, read: EngineGraphRead): Record<string, ResourceMetadata>;
465
+ /**
466
+ * The facts of {@link readEngineGraph}'s reads that no node of the live graph
467
+ * will carry (#5333), by the node id the declared graph gives them: a block
468
+ * `resources` does not hold (a pending create, or one `owned` filtered out),
469
+ * and an instance that is not a present instance of a block it holds. These
470
+ * are the `pending` nodes of a live root, and its `unowned` and `foreign`
471
+ * ones under `--owned`; `chant graph --live --overlay` puts them on the
472
+ * declared nodes (`ObservationResult.engineFacts`).
473
+ */
474
+ export declare function engineFactsBeside(resources: Record<string, ResourceMetadata>, reads: readonly EngineGraphRead[]): Record<string, EngineFacts>;
475
+ /**
476
+ * The environment variable that adds a `live-ls -json` listing to each live
477
+ * root's engine facts (#5402). Set to `1`, a live read also runs `choudoufu
478
+ * live-ls -estate=<estate> -json .` per root, and each node's
479
+ * `facts.ownershipRows` carries the listing's `gaps[]` and, on a bound node,
480
+ * `listed`. Unset, no listing runs.
481
+ */
482
+ export declare const TERRAFORM_LIVE_LISTING_ENV = "CHANT_TERRAFORM_LIVE_LISTING";
483
+ /**
484
+ * The objects a live root's estate binds that no block of its configuration
485
+ * declares (#5429), as live nodes keyed by {@link entityKeyFor}: each
486
+ * `live-plan` `bound[]` address no declared block or module call answers for
487
+ * (choudoufu's `live-graph` gives it a `not-in-configuration` gap), and each
488
+ * `live-ls` item with `declared: false` when the listing ran.
489
+ *
490
+ * Each one's `type` is the resource type choudoufu prints (`bound[].type`, or
491
+ * the item's `type`), its status `orphan`, the word {@link observeAmbient}
492
+ * gives the same object, and its ownership `owned`, since the estate's marker
493
+ * or record bound it. Its facts are the engine graph's node for the address
494
+ * with the address's rows under `ownershipRows`: `boundBy`, `listed` and the
495
+ * gaps from `live-graph` and `live-ls`.
496
+ *
497
+ * Empty when every bound address and listed item is declared, so such a root
498
+ * reads exactly as before.
499
+ */
500
+ export declare function undeclaredBound(root: string, declared: readonly TerraformDeclared[], index: LivePlanIndex, listing?: LiveLsListing, read?: EngineGraphRead): Record<string, ResourceMetadata>;
445
501
  /** One `items[]` entry of a `live-ls -json` listing. */
446
502
  export interface LiveLsItem {
447
503
  /** ARN or other stable identity. */