@intentius/chant-lexicon-terraform 0.60.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/describe-resources.d.ts +59 -0
- package/dist/describe-resources.d.ts.map +1 -1
- package/dist/hcl/edges.d.ts +124 -0
- package/dist/hcl/edges.d.ts.map +1 -0
- package/dist/hcl/parse.d.ts +42 -0
- package/dist/hcl/parse.d.ts.map +1 -1
- package/dist/hcl/roots.d.ts +6 -0
- package/dist/hcl/roots.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/dist/op/activities/terraform.d.ts +44 -8
- package/dist/op/activities/terraform.d.ts.map +1 -1
- package/dist/op/adoption.d.ts +110 -35
- package/dist/op/adoption.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__fixtures__/ACCEPTANCE.md +92 -58
- package/src/__fixtures__/graph-roots/README.md +21 -0
- package/src/__fixtures__/graph-roots/app/main.tf +41 -0
- package/src/__fixtures__/graph-roots/app/modules/cdn/main.tf +7 -0
- package/src/__fixtures__/graph-roots/network/main.tf +16 -0
- package/src/__fixtures__/live-estate/README.md +65 -19
- package/src/__fixtures__/live-estate/adoptable.tf +13 -0
- package/src/__fixtures__/live-ls.json +5 -5
- package/src/__fixtures__/live-plan.json +67 -35
- package/src/composites/terraform-adopt-op.acceptance.test.ts +36 -50
- package/src/composites/terraform-apply-op.acceptance.test.ts +4 -2
- package/src/describe-resources.live.test.ts +76 -4
- package/src/describe-resources.test.ts +35 -0
- package/src/describe-resources.ts +110 -3
- package/src/hcl/edges.test.ts +207 -0
- package/src/hcl/edges.ts +316 -0
- package/src/hcl/parse.ts +53 -0
- package/src/hcl/roots.ts +14 -0
- package/src/index.ts +1 -0
- package/src/op/activities/choudoufu.test.ts +3 -3
- package/src/op/activities/terraform.ts +70 -21
- package/src/op/adoption.test.ts +129 -11
- package/src/op/adoption.ts +181 -49
|
@@ -13,6 +13,34 @@
|
|
|
13
13
|
* and the marker on the resource is the ownership answer. The two halves are
|
|
14
14
|
* two adapters over the same `observeEntities` harness, picked per root.
|
|
15
15
|
*
|
|
16
|
+
* ## Which of the two answered is on the wire (#2267)
|
|
17
|
+
*
|
|
18
|
+
* They are different claims. `terraform show -json` says what the last apply
|
|
19
|
+
* recorded; `choudoufu live-plan -json` says what the account holds now. A
|
|
20
|
+
* renderer that paints an observation as drift and cannot tell them apart
|
|
21
|
+
* paints a state read green, which reads as "the account matches" when all it
|
|
22
|
+
* says is "the apply finished". For an estate that has decided state is never
|
|
23
|
+
* the system of record, a state-backed observation is not a weaker answer, it
|
|
24
|
+
* is a different one.
|
|
25
|
+
*
|
|
26
|
+
* So the returned `ObservationResult` carries `sources`, keyed by chant entity
|
|
27
|
+
* name, with one of exactly two values:
|
|
28
|
+
*
|
|
29
|
+
* - `"state"` — this entity's root was read with `terraform show -json`.
|
|
30
|
+
* - `"live"` — this entity's root was read with `choudoufu live-plan -json`.
|
|
31
|
+
*
|
|
32
|
+
* Three guarantees a consumer may rely on. Every entity `describeResources`
|
|
33
|
+
* was asked about that belongs to a root has an entry, whatever verdict it
|
|
34
|
+
* came back with: present, absent and not-observed alike, because which read
|
|
35
|
+
* was attempted is a fact independent of what it found. The value equals the
|
|
36
|
+
* declared entity's own `props.mode` (`./hcl/parse.ts`), since one fact
|
|
37
|
+
* decides both, so `props.mode` is also a valid join key for a consumer
|
|
38
|
+
* holding the declared graph and no observation. And a project mixing stock
|
|
39
|
+
* and live roots gets both values in one document, which is why this is a map
|
|
40
|
+
* and not a field on the result as a whole.
|
|
41
|
+
*
|
|
42
|
+
* An entity with no root gets no entry, for the same reason it gets no read.
|
|
43
|
+
*
|
|
16
44
|
* ## The state file is the ownership answer, on a stock root
|
|
17
45
|
*
|
|
18
46
|
* Every other lexicon in chant stamps a tag or a label at synthesis and reads
|
|
@@ -54,6 +82,7 @@
|
|
|
54
82
|
* | `bound[]`, any other source | present, `owned` by derivation, record, or cache; noted as such, and no marker is surfaced because none was read |
|
|
55
83
|
* | `unowned[]` with `adopt_*` | present, `unknown`; an adoptable match, carrying the exact two tag values #2105 would write |
|
|
56
84
|
* | `unowned[]` without | present, `foreign`; a live resource is in the way at a declared identity and the plan will not touch it |
|
|
85
|
+
* | `adoptable[]` | present, `unknown`; the same adoptable verdict, for a live resource the sweep content-matched to a declaration that carries no identity of its own (choudoufu #962, chant #2241) |
|
|
57
86
|
* | `omissions[]` | not-observed, `ABSENT` excepted (see below) |
|
|
58
87
|
*
|
|
59
88
|
* The ownership channel this declares is `./live-ownership.ts`'s
|
|
@@ -194,6 +223,29 @@ export interface LivePlanUnownedRow {
|
|
|
194
223
|
/** `adopt_tofu_address`: the escaped address the adopting tag write would carry. */
|
|
195
224
|
adoptAddress?: string;
|
|
196
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* One `adoptable[]` entry: a live resource the estate-wide sweep matched to a
|
|
228
|
+
* declared instance by content rather than by reading a declared identity
|
|
229
|
+
* (choudoufu #962). The declaration names no identity at all, so this is the
|
|
230
|
+
* only row the document has for it and the paired omission says
|
|
231
|
+
* `NEEDS_DISCOVERY`.
|
|
232
|
+
*
|
|
233
|
+
* Same fields as {@link LivePlanUnownedRow} minus `heldBy`, which cannot
|
|
234
|
+
* apply: a row here carries no marker for any estate, or the sweep would have
|
|
235
|
+
* called it foreign instead of unclaimed.
|
|
236
|
+
*/
|
|
237
|
+
export interface LivePlanAdoptableRow {
|
|
238
|
+
addr: string;
|
|
239
|
+
type?: string;
|
|
240
|
+
identity?: string;
|
|
241
|
+
adoptEstate?: string;
|
|
242
|
+
adoptAddress?: string;
|
|
243
|
+
/** `matched[]`: the arguments the declaration and the live resource agreed on exactly. */
|
|
244
|
+
matched?: Array<{
|
|
245
|
+
attribute: string;
|
|
246
|
+
value: string;
|
|
247
|
+
}>;
|
|
248
|
+
}
|
|
197
249
|
/** A `live-plan -json` document, indexed by declared instance address. */
|
|
198
250
|
export interface LivePlanIndex {
|
|
199
251
|
/** `estate`: the estate every section was computed against. */
|
|
@@ -201,6 +253,13 @@ export interface LivePlanIndex {
|
|
|
201
253
|
bound: Map<string, LivePlanBoundRow>;
|
|
202
254
|
omissions: Map<string, LivePlanOmissionRow>;
|
|
203
255
|
unowned: Map<string, LivePlanUnownedRow>;
|
|
256
|
+
adoptable: Map<string, LivePlanAdoptableRow>;
|
|
257
|
+
/**
|
|
258
|
+
* `swept[]`: the resource types the estate-wide sweep listed in full. Empty
|
|
259
|
+
* on every observation read, which asks for no sweep, so an empty
|
|
260
|
+
* `adoptable` beside it says nothing was asked rather than nothing found.
|
|
261
|
+
*/
|
|
262
|
+
swept: string[];
|
|
204
263
|
/** Every address any section named, so a block can find its own instances. */
|
|
205
264
|
addresses: string[];
|
|
206
265
|
/** `diagnostics[]` summaries, for the observation's run-level notes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe-resources.d.ts","sourceRoot":"","sources":["../src/describe-resources.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"describe-resources.d.ts","sourceRoot":"","sources":["../src/describe-resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyJG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAEhB,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAQL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAMnC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CAAC;IAC9E;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,EACjC,IAAI,GAAE,iBAA6B,GAClC,OAAO,CAAC,uBAAuB,CAAC,CAuElC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve each block's references into graph edges (chant #2265).
|
|
3
|
+
*
|
|
4
|
+
* `chant graph --format ir` used to emit a complete, module-descended,
|
|
5
|
+
* fully-attributed node set for a Terraform estate and zero edges. Core's
|
|
6
|
+
* `collectEdges` walks a node's config bag for `AttrRef` objects and `Ref`
|
|
7
|
+
* intrinsics; a block body out of hcl2json holds `"${aws_vpc.main.id}"`, a
|
|
8
|
+
* string, so the walk found nothing and said so. This module supplies what
|
|
9
|
+
* that walk cannot see: the references, already resolved to the entity keys
|
|
10
|
+
* `blocksToEntities` minted, published on each entity as core's lexicon-neutral
|
|
11
|
+
* `EntityReference` (see `@intentius/chant/graph-ir`).
|
|
12
|
+
*
|
|
13
|
+
* ## Where the reference forms come from
|
|
14
|
+
*
|
|
15
|
+
* The `${...}` body is tokenized by hcl2json's own expression AST
|
|
16
|
+
* (`getReferencesInExpression`), never by a regex over the string. That is the
|
|
17
|
+
* same instrument `packages/core/src/terraform/parse.ts` uses for the carve-out
|
|
18
|
+
* advisor, and for the same reason: a quoted address used as a map key
|
|
19
|
+
* (`var.m["aws_s3_bucket.assets.arn"]`) and an escaped `$${...}` literal are
|
|
20
|
+
* not references, and no regex over the raw string can tell. `./references.ts`
|
|
21
|
+
* IS such a regex scan and stays one: it answers "is this declaration used
|
|
22
|
+
* anywhere", deliberately generously, for a report-only rule. An edge a
|
|
23
|
+
* renderer draws is a stricter claim and gets the stricter instrument.
|
|
24
|
+
*
|
|
25
|
+
* Each accessor the AST returns is classified by core's own `refFromAccessor`
|
|
26
|
+
* for the three forms it already knows (`<type>.<name>`, `module.<name>`,
|
|
27
|
+
* `data.<type>.<name>`), and here for the two it deliberately excludes as
|
|
28
|
+
* non-resources, `var.<name>` and `local.<name>`.
|
|
29
|
+
*
|
|
30
|
+
* ## Four decisions a renderer will draw
|
|
31
|
+
*
|
|
32
|
+
* **Which forms become edges.** All five: `resource`, `data`, `module`, `var`
|
|
33
|
+
* and `local`. The first three are uncontroversial. The last two are edges
|
|
34
|
+
* because this lexicon emits a NODE for every `variable` and every `locals`
|
|
35
|
+
* block, and on a real estate those are the majority of them (108 variables
|
|
36
|
+
* and 10 locals out of 247 nodes, on the estate the issue was filed against).
|
|
37
|
+
* Dropping their edges would leave nearly half the graph as unconnected cards,
|
|
38
|
+
* which is the same picture the zero-edge bug drew. "Which resources consume
|
|
39
|
+
* `var.region`" is also a question a reader of a root module actually asks,
|
|
40
|
+
* and `terraform graph` itself answers it.
|
|
41
|
+
*
|
|
42
|
+
* A `local.<name>` resolves to the `locals` BLOCK that declares that name,
|
|
43
|
+
* found by looking `name` up in each block's body, so two `locals` blocks in
|
|
44
|
+
* one scope resolve independently rather than both matching.
|
|
45
|
+
*
|
|
46
|
+
* `provider = aws.west` is NOT an edge. The reference names a `provider`
|
|
47
|
+
* block by type AND alias, and this lexicon's entity key for one is
|
|
48
|
+
* `provider.<type>` with the alias inside the body, so two aliased providers
|
|
49
|
+
* of one type key as `provider.aws` and `provider.aws~2` and the reference
|
|
50
|
+
* cannot be resolved to either without guessing. `./references.ts` still
|
|
51
|
+
* records it for TF020, where "is it used at all" is answerable without
|
|
52
|
+
* knowing which block.
|
|
53
|
+
*
|
|
54
|
+
* **`depends_on` is an edge.** It arrives from hcl2json as
|
|
55
|
+
* `["${aws_vpc.main}"]` under the key `depends_on`, so it resolves through the
|
|
56
|
+
* same path as any other reference and lands as `viaAttr: "depends_on"` with
|
|
57
|
+
* no `toAttr`, which is exactly what it is: an ordering edge with no attribute
|
|
58
|
+
* flowing along it.
|
|
59
|
+
*
|
|
60
|
+
* **`count` / `for_each` are block-to-block.** chant's entity is the block, so
|
|
61
|
+
* `count = 3` is one node and one edge, not three. The expansion itself is
|
|
62
|
+
* recorded on the entity (`props.expansion`, `./parse.ts`) rather than left to
|
|
63
|
+
* be inferred from a node count that never grows. A `count = length(var.x)`
|
|
64
|
+
* also yields a real edge to `var.x` through `viaAttr: "count"`, since the
|
|
65
|
+
* meta-argument is an expression like any other.
|
|
66
|
+
*
|
|
67
|
+
* **Attribute naming.** `viaAttr` is the consumer-side TOP-LEVEL attribute the
|
|
68
|
+
* reference sits under and `toAttr` the producer-side attribute it read, which
|
|
69
|
+
* is the same pair carve's `TfEdge` carries as `via` and `attrs` and the pair
|
|
70
|
+
* behold already renders. One edge per (consumer, producer, `viaAttr`), and
|
|
71
|
+
* `toAttr` is set only when that edge read exactly one producer attribute:
|
|
72
|
+
* `subnet_id = aws_subnet.a.id` gives `id`, while
|
|
73
|
+
* `tags = merge(aws_vpc.main.tags, { id = aws_vpc.main.id })` names two and
|
|
74
|
+
* gets none rather than an arbitrary one.
|
|
75
|
+
*
|
|
76
|
+
* ## Scope, and what is deliberately not resolved
|
|
77
|
+
*
|
|
78
|
+
* Resolution is bounded to the referring block's own module scope
|
|
79
|
+
* (`scopeOfKey`), which is Terraform's own namespace: a `var.region` inside
|
|
80
|
+
* `module.cdn` is the child module's variable and never the root's. That also
|
|
81
|
+
* means no edge ever crosses roots, which is correct and intended (#2265):
|
|
82
|
+
* separate roots read each other by NAME through a data source, never by
|
|
83
|
+
* reference, and a value-match pass over those is a consumer's job, not this
|
|
84
|
+
* one's.
|
|
85
|
+
*/
|
|
86
|
+
import { type Declarable } from "@intentius/chant/declarable";
|
|
87
|
+
import type { EntityReference } from "@intentius/chant/graph-ir";
|
|
88
|
+
import { type Hcl2Json } from "@intentius/chant/terraform/parse";
|
|
89
|
+
import { type TerraformEntity } from "./parse.js";
|
|
90
|
+
/**
|
|
91
|
+
* Classify one AST traversal accessor. `var`/`local` are handled here because
|
|
92
|
+
* core's `refFromAccessor` excludes them by design (they are not carvable
|
|
93
|
+
* resources); everything else defers to it, quoted map keys and numeric
|
|
94
|
+
* indexes included.
|
|
95
|
+
*/
|
|
96
|
+
export declare function referenceFromAccessor(accessor: string): {
|
|
97
|
+
address: string;
|
|
98
|
+
attr?: string;
|
|
99
|
+
} | undefined;
|
|
100
|
+
/** Address to entity key, and local name to the `locals` block declaring it, per module scope. */
|
|
101
|
+
export interface ScopeIndex {
|
|
102
|
+
byAddress: Map<string, string>;
|
|
103
|
+
byLocal: Map<string, string>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The references one block declares, resolved to entity keys and collapsed to
|
|
107
|
+
* one entry per (producer, `viaAttr`). Sorted, so the IR a build emits is
|
|
108
|
+
* byte-stable across runs.
|
|
109
|
+
*/
|
|
110
|
+
export declare function referencesOfEntity(key: string, entity: TerraformEntity, scopes: ReadonlyMap<string, ScopeIndex>, accessors: ReadonlyMap<string, readonly string[]>): EntityReference[];
|
|
111
|
+
/**
|
|
112
|
+
* Stamp `references` onto every terraform entity in `entities`, in place.
|
|
113
|
+
*
|
|
114
|
+
* Takes the whole build's entity map rather than one root's, because one
|
|
115
|
+
* shared expression cache across every root is what keeps this to one wasm
|
|
116
|
+
* call per DISTINCT expression instead of one per occurrence. Resolution is
|
|
117
|
+
* still per module scope, so pooling the parse pools no references.
|
|
118
|
+
*
|
|
119
|
+
* Best effort, like everything else on this path: a parser that cannot be
|
|
120
|
+
* loaded, or one that does not expose the expression AST, leaves every entity
|
|
121
|
+
* unreferenced rather than failing a build over a diagram.
|
|
122
|
+
*/
|
|
123
|
+
export declare function resolveEntityReferences(entities: Map<string, Declarable>, hcl2json?: Hcl2Json): Promise<void>;
|
|
124
|
+
//# sourceMappingURL=edges.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../src/hcl/edges.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AAEH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAA2C,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAkBxF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAItG;AAiED,kGAAkG;AAClG,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AA6CD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EACvC,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GAChD,eAAe,EAAE,CA4BnB;AAOD;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACjC,QAAQ,CAAC,EAAE,QAAQ,GAClB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
|
package/dist/hcl/parse.d.ts
CHANGED
|
@@ -19,10 +19,22 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { type Hcl2Json } from "@intentius/chant/terraform/parse";
|
|
21
21
|
import { type Declarable } from "@intentius/chant/declarable";
|
|
22
|
+
import type { EntityReference } from "@intentius/chant/graph-ir";
|
|
22
23
|
import type { SuppressionDirective } from "@intentius/chant/lint/suppressions";
|
|
23
24
|
import type { TerraformDeleteMode } from "../config.js";
|
|
24
25
|
/** A parsed HCL block body, as `@cdktf/hcl2json` encodes it. */
|
|
25
26
|
export type BlockBody = Record<string, unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* The meta-argument that expands a block into instances, when it carries one
|
|
29
|
+
* (chant #2265). Recorded because chant's entity is the BLOCK, one node
|
|
30
|
+
* whatever `count` evaluates to, so an edge out of an expanded block is
|
|
31
|
+
* block-to-block and says nothing about how many instances reference how many
|
|
32
|
+
* others. That is the honest shape for a read of the declaration alone, since
|
|
33
|
+
* the instance count is a plan-time answer and often a state-time one, but it
|
|
34
|
+
* is a shape a reader should be told rather than left to infer from a node
|
|
35
|
+
* count that never grows.
|
|
36
|
+
*/
|
|
37
|
+
export type TerraformExpansion = "count" | "for_each";
|
|
26
38
|
/** Whether a root runs under choudoufu with a declared estate (#2103). */
|
|
27
39
|
export type TerraformRootMode = "live" | "state";
|
|
28
40
|
/** The entity every block becomes. `props` is what post-synth checks read. */
|
|
@@ -92,7 +104,37 @@ export interface TerraformEntity extends Declarable {
|
|
|
92
104
|
* quotes still exist. Empty when a caller built the entity by hand.
|
|
93
105
|
*/
|
|
94
106
|
readonly source: string;
|
|
107
|
+
/**
|
|
108
|
+
* `count` or `for_each` when the block carries one (chant #2265). See
|
|
109
|
+
* {@link TerraformExpansion} for why one node still stands for the whole
|
|
110
|
+
* expansion.
|
|
111
|
+
*/
|
|
112
|
+
readonly expansion?: TerraformExpansion;
|
|
95
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* The deployable unit this entity belongs to: the root name, which is what
|
|
116
|
+
* one `terraform apply` runs against (chant #2266).
|
|
117
|
+
*
|
|
118
|
+
* Duplicates `props.root`, deliberately. `props` is what this lexicon's own
|
|
119
|
+
* checks and serializer read; `stack` is the lexicon-neutral field core's
|
|
120
|
+
* `buildGraphIr` reads to key `groups.byStack`, so a five-root project draws
|
|
121
|
+
* as five boundary boxes instead of one bucket named `terraform`. Core has
|
|
122
|
+
* no business reaching into a lexicon's `props` to find out, and this
|
|
123
|
+
* lexicon has no business knowing how the grouping is built, so the fact is
|
|
124
|
+
* said once in each vocabulary. A child module's blocks carry the calling
|
|
125
|
+
* ROOT's name, not the module's: the module is not separately applied.
|
|
126
|
+
*/
|
|
127
|
+
readonly stack: string;
|
|
128
|
+
/**
|
|
129
|
+
* Every reference in this block, resolved to the entity keys it points at
|
|
130
|
+
* (chant #2265), in core's lexicon-neutral {@link EntityReference} shape.
|
|
131
|
+
*
|
|
132
|
+
* Absent until `./edges.ts` resolves it, which needs the whole root's entity
|
|
133
|
+
* set and so cannot happen inside the per-file parse below. An entity that
|
|
134
|
+
* never went through that pass carries none, which reads as "no references
|
|
135
|
+
* were resolved", never as "this block references nothing".
|
|
136
|
+
*/
|
|
137
|
+
readonly references?: readonly EntityReference[];
|
|
96
138
|
/**
|
|
97
139
|
* `# chant-ignore`/`chant-ignore-file`/`chant-ignore-block` directives that
|
|
98
140
|
* apply to this entity (chant #2111): the ones anchored to its own block,
|
package/dist/hcl/parse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/hcl/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrD,gEAAgE;AAChE,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,0EAA0E;AAC1E,M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BAAyB,CAC7C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,QAAQ,EACnB,WAAW,CAAC,EAAE,wBAAwB,GACrC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAElC;AAED,2EAA2E;AAC3E,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAInD;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,kGAAkG;AAClG,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAGlD"}
|
package/dist/hcl/roots.d.ts
CHANGED
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
* local source is followed into its directory and parsed as a child scope of
|
|
19
19
|
* the root (#2112). `./descend.ts` owns that walk and every refusal in it; the
|
|
20
20
|
* refusals surface here as this render's warnings.
|
|
21
|
+
*
|
|
22
|
+
* One pass runs after every root has parsed: `./edges.ts` resolves each
|
|
23
|
+
* block's `${...}` references into the entity keys they name, so the graph IR
|
|
24
|
+
* has edges to draw (#2265). It runs here rather than inside the per-file
|
|
25
|
+
* parse because an edge's target may be a block in a file, or a child module,
|
|
26
|
+
* that has not been read yet.
|
|
21
27
|
*/
|
|
22
28
|
import { type Declarable } from "@intentius/chant/declarable";
|
|
23
29
|
import type { Hcl2Json } from "@intentius/chant/terraform/parse";
|
package/dist/hcl/roots.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roots.d.ts","sourceRoot":"","sources":["../../src/hcl/roots.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"roots.d.ts","sourceRoot":"","sources":["../../src/hcl/roots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAyC,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAGvF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,wFAAwF;IACxF,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACrD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,oBAAoB,CAAC,CAgE/B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { terraformConfigSchema, terraformRootSchema, type TerraformConfig, type
|
|
|
4
4
|
export { blocksToEntities, parseTerraformRootContent, parseTerraformRootDir, readLiveSidecarFile, splitBundleContent, terraformEntity, DATA_TYPE, LIVE_SIDECAR_FILENAME, LIVE_TYPE, LOCALS_TYPE, MODULE_TYPE, OUTPUT_TYPE, PROVIDER_TYPE, RESOURCE_TYPE, TERRAFORM_TYPE, VARIABLE_TYPE, type BlockBody, type TerraformEntity, type TerraformFile, type TerraformRootMode, type TerraformRootModeOptions, } from "./hcl/parse.js";
|
|
5
5
|
export { renderTerraformRoots, type TerraformRootsResult } from "./hcl/roots.js";
|
|
6
6
|
export { terraformInit, terraformPlan, terraformApply, terraformShow, choudoufuLivePlan, choudoufuLiveLs, choudoufuLiveCheck, choudoufuAdopt, } from "./op/builders.js";
|
|
7
|
-
export { parseAdoptionCommands, readAdoptionLedger, renderAdoptionLedger, type AdoptionCandidate, type AdoptionLedger, } from "./op/adoption.js";
|
|
7
|
+
export { parseAdoptionCommands, readAdoptionLedger, renderAdoptionLedger, type AdoptionCandidate, type AdoptionLedger, type AdoptionMatch, } from "./op/adoption.js";
|
|
8
8
|
export { TerraformApplyOp } from "./composites/terraform-apply-op.js";
|
|
9
9
|
export type { TerraformApplyOpConfig, TerraformApplyOpResources, TerraformGateMode, } from "./composites/terraform-apply-op.js";
|
|
10
10
|
export { TerraformWatchOp } from "./composites/terraform-watch-op.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,UAAU,CAAC;AAIlB,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,oBAAoB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAK9E,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,GACf,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,UAAU,CAAC;AAIlB,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,oBAAoB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAK9E,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,GACf,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAKzG,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "da8f1f7391554299a9dac6411b3d346aac233088d22d080a5c31feb56754ca19",
|
|
5
5
|
"meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
|
|
6
6
|
"types/index.d.ts": "022927e6a7b351cc4cf52d5f973f60ccd140e5810e17b32fb8868965aa1db161",
|
|
7
7
|
"rules/plan-before-apply.ts": "31b1b3176799fd365b2583fe3947edd187c2a863e3dc0094ed9e91ece2464c99",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"rules/tf028.ts": "81ef95659c40ad1774c83e663473ed769143d894a4ba0517c3defa31f00ba723",
|
|
38
38
|
"skills/chant-terraform.md": "d9ca7b7c28aed0038ce775a3491150298492eed2858fd3651ed9bfca0e577ae8"
|
|
39
39
|
},
|
|
40
|
-
"composite": "
|
|
40
|
+
"composite": "14b513f2e660229ea7f075738074c2cb08fe27e2e42a6ae1fd7e7cd708233ca1"
|
|
41
41
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -56,11 +56,20 @@ export declare const DEFAULT_LIVE_PLAN_DOCUMENT_FILE = "chant.live-plan.json";
|
|
|
56
56
|
* estate ([choudoufu #894](https://github.com/INTENTIUS/choudoufu/issues/894),
|
|
57
57
|
* PR 915), which is the shape every chant live root has: before it,
|
|
58
58
|
* {@link choudoufuLivePlan} could not produce the document for a real root at
|
|
59
|
-
* all.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* all. v0.15.0 brought the document's `adoptable` section and the `swept`
|
|
60
|
+
* list beside it
|
|
61
|
+
* ([choudoufu #962](https://github.com/INTENTIUS/choudoufu/issues/962), PR
|
|
62
|
+
* 963), which is the only place a content match reaches a machine: before it,
|
|
63
|
+
* a declared resource whose identity the provider assigns could never be
|
|
64
|
+
* adopted through the document at all, and `TerraformAdoptOp`'s own
|
|
65
|
+
* acceptance suite had never passed on any binary (#2241).
|
|
66
|
+
*
|
|
67
|
+
* {@link terraformApply} depends on the exit-3 refusal, `describeResources()`
|
|
68
|
+
* and both document-reading Ops depend on the document, and the adopt path
|
|
69
|
+
* depends on the `adoptable` section, so the floor is the release that
|
|
70
|
+
* shipped the last of the three.
|
|
62
71
|
*/
|
|
63
|
-
export declare const MIN_CHOUDOUFU_VERSION = "0.
|
|
72
|
+
export declare const MIN_CHOUDOUFU_VERSION = "0.15.0";
|
|
64
73
|
/**
|
|
65
74
|
* choudoufu's own refusal summary for `-out` on the `live-plan -estate`
|
|
66
75
|
* surface (`internal/command/live_mode.go`). That is the one surface where a
|
|
@@ -147,6 +156,12 @@ export interface ChoudoufuLivePlanArgs extends TerraformRootArgs {
|
|
|
147
156
|
* cost is that the second read asks the estate-wide sweep the account-bounded
|
|
148
157
|
* question ("which live resources carry no ownership marker at all"), so it
|
|
149
158
|
* is slower than the ordinary render, not faster.
|
|
159
|
+
*
|
|
160
|
+
* Since #2241 the flag also puts `TOFU_LIVE_COLLECT_UNCLAIMED=1` on the
|
|
161
|
+
* `-json` run, so the document carries the same sweep's answer as its
|
|
162
|
+
* `adoptable` and `swept` sections rather than only the render carrying it.
|
|
163
|
+
* That is what an adoption reads: the render's rows are prose, and the
|
|
164
|
+
* document's are addresses, marker values and a tagging command.
|
|
150
165
|
*/
|
|
151
166
|
adoptionOnly?: boolean;
|
|
152
167
|
}
|
|
@@ -229,11 +244,22 @@ export interface TerraformApplyResult {
|
|
|
229
244
|
/** choudoufu's own refusal text, verbatim, when {@link refused} is set. */
|
|
230
245
|
refusal?: string;
|
|
231
246
|
}
|
|
232
|
-
/** Counts projected out of `live-plan -json`'s `unowned`
|
|
247
|
+
/** Counts projected out of `live-plan -json`'s `unowned` and `adoptable` sections. */
|
|
233
248
|
export interface LivePlanUnownedCounts {
|
|
234
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* `unowned[]`'s length: live resources sitting at an identity this
|
|
251
|
+
* configuration declares, carrying no ownership marker for this estate.
|
|
252
|
+
*/
|
|
235
253
|
unowned: number;
|
|
236
|
-
/**
|
|
254
|
+
/**
|
|
255
|
+
* Every live resource this run could claim with a tag write, from both
|
|
256
|
+
* sections: the `unowned[]` rows choudoufu offered marker values for, plus
|
|
257
|
+
* the `adoptable[]` rows the estate-wide sweep content-matched to a
|
|
258
|
+
* declaration that carries no identity of its own (choudoufu #962). Those
|
|
259
|
+
* two sections are disjoint, so this is a sum and never a double count.
|
|
260
|
+
* `adoptable[]` is populated only on an adoption run (#2241), so an
|
|
261
|
+
* observation read's document contributes nothing to it.
|
|
262
|
+
*/
|
|
237
263
|
adoptable: number;
|
|
238
264
|
}
|
|
239
265
|
/**
|
|
@@ -258,7 +284,10 @@ export interface LivePlanUnownedCounts {
|
|
|
258
284
|
export interface ChoudoufuLivePlanResult extends LivePlanUnownedCounts, PlanChangeCounts {
|
|
259
285
|
/** `true` when `-detailed-exitcode` reported exit 2: the live plan proposes changes. */
|
|
260
286
|
drift: boolean;
|
|
261
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* GitHub issue #788's JSON document (`bound`, `omissions`, `unowned`, and
|
|
289
|
+
* since choudoufu v0.15.0 `adoptable` and `swept`), captured whole.
|
|
290
|
+
*/
|
|
262
291
|
json: unknown;
|
|
263
292
|
/**
|
|
264
293
|
* The human-readable plan, from a second `live-plan` run without `-json`
|
|
@@ -286,6 +315,13 @@ export interface ChoudoufuLivePlanResult extends LivePlanUnownedCounts, PlanChan
|
|
|
286
315
|
contested: AdoptionCandidate[];
|
|
287
316
|
/** How many declared addresses are contested — the count `contested` above spells out. */
|
|
288
317
|
ambiguous: number;
|
|
318
|
+
/**
|
|
319
|
+
* `swept[]`: the resource types the estate-wide sweep listed in full on this
|
|
320
|
+
* run. Empty on any run that did not ask for the sweep, which is every run
|
|
321
|
+
* without {@link ChoudoufuLivePlanArgs.adoptionOnly}, so an empty
|
|
322
|
+
* `adoptions` beside an empty `swept` means the question was never put.
|
|
323
|
+
*/
|
|
324
|
+
swept: string[];
|
|
289
325
|
/** Absolute path of the root module directory. */
|
|
290
326
|
dir: string;
|
|
291
327
|
/** Where the JSON document was written, relative to `dir`; {@link DEFAULT_LIVE_PLAN_DOCUMENT_FILE} unless overridden. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terraform.d.ts","sourceRoot":"","sources":["../../../src/op/activities/terraform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,aAAa,CAAC;AAWrB,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,cAAc,CAAC;AAEpD,gHAAgH;AAChH,eAAO,MAAM,+BAA+B,yBAAyB,CAAC;AAEtE
|
|
1
|
+
{"version":3,"file":"terraform.d.ts","sourceRoot":"","sources":["../../../src/op/activities/terraform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAOH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