@intentius/chant-lexicon-terraform 0.58.0 → 0.60.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/README.md +9 -0
- package/dist/composites/terraform-adopt-op.d.ts +7 -2
- package/dist/composites/terraform-adopt-op.d.ts.map +1 -1
- package/dist/composites/terraform-apply-op.d.ts +8 -2
- package/dist/composites/terraform-apply-op.d.ts.map +1 -1
- package/dist/composites/terraform-watch-op.d.ts +30 -7
- package/dist/composites/terraform-watch-op.d.ts.map +1 -1
- package/dist/hcl/parse.d.ts +14 -0
- package/dist/hcl/parse.d.ts.map +1 -1
- package/dist/integrity.json +7 -5
- package/dist/lint/audit-catalog.d.ts +2 -2
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/audit-lineage.d.ts +39 -12
- package/dist/lint/audit-lineage.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/tf001.d.ts +40 -6
- package/dist/lint/post-synth/tf001.d.ts.map +1 -1
- package/dist/lint/post-synth/tf015.d.ts +11 -2
- package/dist/lint/post-synth/tf015.d.ts.map +1 -1
- package/dist/lint/post-synth/tf026.d.ts +7 -0
- package/dist/lint/post-synth/tf026.d.ts.map +1 -1
- package/dist/lint/post-synth/tf027.d.ts +30 -0
- package/dist/lint/post-synth/tf027.d.ts.map +1 -0
- package/dist/lint/post-synth/tf028.d.ts +33 -0
- package/dist/lint/post-synth/tf028.d.ts.map +1 -0
- package/dist/lsp/option-keys.d.ts.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/okf/index.md +2 -0
- package/dist/okf/rules/TF027.md +11 -0
- package/dist/okf/rules/TF028.md +11 -0
- package/dist/op/activities/terraform.d.ts +32 -11
- package/dist/op/activities/terraform.d.ts.map +1 -1
- package/dist/op/builders.d.ts +7 -5
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/resolve-root-mode.d.ts +29 -15
- package/dist/op/resolve-root-mode.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/rules/tf001.ts +70 -14
- package/dist/rules/tf015.ts +11 -2
- package/dist/rules/tf026.ts +6 -2
- package/dist/rules/tf027.ts +74 -0
- package/dist/rules/tf028.ts +96 -0
- package/dist/validate.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__fixtures__/ACCEPTANCE.md +181 -0
- package/src/__fixtures__/remote-backend/main.tf +34 -0
- package/src/__fixtures__/with-backend/main.tf +7 -0
- package/src/codegen/lint-rules-page.test.ts +18 -1
- package/src/composites/terraform-adopt-op.acceptance.test.ts +46 -19
- package/src/composites/terraform-adopt-op.test.ts +9 -4
- package/src/composites/terraform-adopt-op.ts +8 -3
- package/src/composites/terraform-apply-op.acceptance.test.ts +14 -9
- package/src/composites/terraform-apply-op.test.ts +13 -5
- package/src/composites/terraform-apply-op.ts +23 -7
- package/src/composites/terraform-watch-op.test.ts +85 -4
- package/src/composites/terraform-watch-op.ts +59 -8
- package/src/hcl/parse.ts +20 -0
- package/src/lint/audit-catalog.ts +26 -2
- package/src/lint/audit-lineage.ts +79 -14
- package/src/lint/audit.test.ts +171 -3
- package/src/lint/post-synth/fixtures/TF001/negative-cloud.tf +28 -0
- package/src/lint/post-synth/fixtures/TF001/negative.tf +4 -2
- package/src/lint/post-synth/fixtures/TF001/positive-local.tf +31 -0
- package/src/lint/post-synth/fixtures/TF014/negative/main.tf +2 -2
- package/src/lint/post-synth/fixtures/TF014/positive/main.tf +2 -2
- package/src/lint/post-synth/fixtures/TF020/scoped/main.tf +2 -2
- package/src/lint/post-synth/fixtures/TF027/live-default/main.tf +9 -0
- package/src/lint/post-synth/fixtures/TF027/live-untagged-delete/main.tf +13 -0
- package/src/lint/post-synth/fixtures/TF027/live-untagged-delete-scoped/main.tf +17 -0
- package/src/lint/post-synth/fixtures/TF027/live-untagged-report/main.tf +13 -0
- package/src/lint/post-synth/fixtures/TF028/live/main.tf +9 -0
- package/src/lint/post-synth/fixtures/TF028/stock/main.tf +10 -0
- package/src/lint/post-synth/index.ts +4 -0
- package/src/lint/post-synth/live-refusals-config-format.test.ts +143 -0
- package/src/lint/post-synth/module-rules.test.ts +1 -1
- package/src/lint/post-synth/post-synth.test.ts +64 -6
- package/src/lint/post-synth/tf001.ts +70 -14
- package/src/lint/post-synth/tf015.ts +11 -2
- package/src/lint/post-synth/tf026.ts +6 -2
- package/src/lint/post-synth/tf027.test.ts +62 -0
- package/src/lint/post-synth/tf027.ts +74 -0
- package/src/lint/post-synth/tf028.test.ts +92 -0
- package/src/lint/post-synth/tf028.ts +96 -0
- package/src/lsp/option-keys.ts +3 -2
- package/src/op/activities/choudoufu.acceptance.test.ts +7 -23
- package/src/op/activities/choudoufu.test.ts +49 -17
- package/src/op/activities/terraform.ts +67 -29
- package/src/op/builders.ts +7 -5
- package/src/op/resolve-root-mode.ts +29 -15
- package/src/plugin.test.ts +38 -0
- package/src/plugin.ts +122 -31
- package/src/validate.ts +10 -1
package/README.md
CHANGED
|
@@ -51,3 +51,12 @@ just docs
|
|
|
51
51
|
- `src/lint/rules/`, source-level lint rules
|
|
52
52
|
- `src/lint/post-synth/`, checks over the parsed roots (TF001 and up)
|
|
53
53
|
- `src/lsp/`, LSP completions and hover
|
|
54
|
+
|
|
55
|
+
## Acceptance evidence
|
|
56
|
+
|
|
57
|
+
Four `describe` blocks run this lexicon against a real `terraform`, `tofu` or
|
|
58
|
+
`choudoufu` binary, and each of them skips rather than fails when its
|
|
59
|
+
dependency is absent. `src/__fixtures__/ACCEPTANCE.md` records, per block,
|
|
60
|
+
what it proves, what gates it, the command that runs it, and the last binary
|
|
61
|
+
and emulator it passed against with the date. Two of the four have never
|
|
62
|
+
passed against anything, and that file says so.
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
*/
|
|
83
83
|
import { OpResource } from "@intentius/chant/op";
|
|
84
84
|
export interface TerraformAdoptOpConfig {
|
|
85
|
-
/** Op name (kebab-case). `
|
|
85
|
+
/** Op name (kebab-case). `gateName` defaults to `approve-<name>`. */
|
|
86
86
|
name: string;
|
|
87
87
|
/** Key into the project's `terraform.roots`. Must be a live root: choudoufu, with a declared estate. */
|
|
88
88
|
root: string;
|
|
@@ -92,7 +92,12 @@ export interface TerraformAdoptOpConfig {
|
|
|
92
92
|
* sidecar, which is the usual case.
|
|
93
93
|
*/
|
|
94
94
|
estate?: string;
|
|
95
|
-
/**
|
|
95
|
+
/** The gate's name. Default: `approve-<name>`, as `TerraformApplyOp` does. */
|
|
96
|
+
gateName?: string;
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated The gate's name was `signalName` through 0.58.0 and is
|
|
99
|
+
* `gateName` since #2202, matching `TerraformApplyOp`. Removed in 0.60.0.
|
|
100
|
+
*/
|
|
96
101
|
signalName?: string;
|
|
97
102
|
/** How long a recorded pending gate stays valid, as a duration string. Default: core's own (48h). */
|
|
98
103
|
gateTimeout?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terraform-adopt-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-adopt-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAEH,OAAO,EAA6B,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAO5E,MAAM,WAAW,sBAAsB;IACrC,
|
|
1
|
+
{"version":3,"file":"terraform-adopt-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-adopt-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAEH,OAAO,EAA6B,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAO5E,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,wGAAwG;IACxG,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AAED,MAAM,WAAW,yBAAyB;IACxC,mEAAmE;IACnE,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,yBAAyB,CAiE1F"}
|
|
@@ -84,7 +84,7 @@ import { OpResource } from "@intentius/chant/op";
|
|
|
84
84
|
*/
|
|
85
85
|
export type TerraformGateMode = "on-destroy" | "always" | "never";
|
|
86
86
|
export interface TerraformApplyOpConfig {
|
|
87
|
-
/** Op name (kebab-case). `
|
|
87
|
+
/** Op name (kebab-case). `gateName` defaults to `approve-<name>`. */
|
|
88
88
|
name: string;
|
|
89
89
|
/** Key into the project's `terraform.roots`. The root carries dir, workspace, var files and backend config. */
|
|
90
90
|
root: string;
|
|
@@ -96,7 +96,13 @@ export interface TerraformApplyOpConfig {
|
|
|
96
96
|
* same phase.
|
|
97
97
|
*/
|
|
98
98
|
gate?: TerraformGateMode;
|
|
99
|
-
/**
|
|
99
|
+
/** The gate's name. Default: `approve-<name>`, as `ApplyOp` does. */
|
|
100
|
+
gateName?: string;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated The gate's name was `signalName` through 0.58.0 and is
|
|
103
|
+
* `gateName` since #2202 (`gate` is taken here by {@link TerraformGateMode}).
|
|
104
|
+
* Still read; removed in 0.60.0.
|
|
105
|
+
*/
|
|
100
106
|
signalName?: string;
|
|
101
107
|
/** How long a recorded pending gate stays valid, as a duration string. Default: core's own (48h). */
|
|
102
108
|
gateTimeout?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terraform-apply-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-apply-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAEH,OAAO,EAA6B,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAW5E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,
|
|
1
|
+
{"version":3,"file":"terraform-apply-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-apply-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAEH,OAAO,EAA6B,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAW5E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,+GAA+G;IAC/G,IAAI,EAAE,MAAM,CAAC;IACb,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AAED,MAAM,WAAW,yBAAyB;IACxC,mEAAmE;IACnE,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,yBAAyB,CA2G1F"}
|
|
@@ -51,16 +51,20 @@
|
|
|
51
51
|
*
|
|
52
52
|
* ## Findings reuse `reconcilePr`
|
|
53
53
|
*
|
|
54
|
-
* `issue` and `pull-request` call core's `reconcilePr` activity,
|
|
55
|
-
* in chant that shells to `gh
|
|
56
|
-
*
|
|
54
|
+
* `issue`, `comment` and `pull-request` call core's `reconcilePr` activity,
|
|
55
|
+
* the one place in chant that shells to `gh`, rather than growing a second
|
|
56
|
+
* copy of those calls here.
|
|
57
57
|
* That activity built its own change-set summary and had no way to be handed
|
|
58
58
|
* one, so #2087 added a single field to it (`ReconcilePrArgs.body`), which is
|
|
59
59
|
* what carries the `-no-color` plan through. Note that the pull-request mode
|
|
60
60
|
* of `reconcilePr` regenerates chant TypeScript via `chant import`; a
|
|
61
61
|
* terraform-native regeneration of HCL from live state is #2089, so
|
|
62
62
|
* `findingMode: "issue"` is the mode with an end-to-end answer and
|
|
63
|
-
* `"pull-request"` opens a PR whose body is the plan.
|
|
63
|
+
* `"pull-request"` opens a PR whose body is the plan. `"comment"` (#2231) is
|
|
64
|
+
* the mode for the plan-on-pull-request shape: the plan is posted onto the
|
|
65
|
+
* pull request that triggered the run and re-edited there on the next push,
|
|
66
|
+
* which is where a reviewer is already looking. It needs that trigger; a run
|
|
67
|
+
* without one fails the Report step by name rather than posting elsewhere. On a live root #2089's
|
|
64
68
|
* question has a different answer rather than a pending one, and it is not
|
|
65
69
|
* regeneration: see `TerraformAdoptOp`.
|
|
66
70
|
*
|
|
@@ -80,6 +84,13 @@
|
|
|
80
84
|
* // one-shot, local executor: chant run app-watch
|
|
81
85
|
* export const { op } = TerraformWatchOp({ name: "app-watch", root: "app" });
|
|
82
86
|
*
|
|
87
|
+
* // the plan as a sticky comment on the pull request that triggered the run
|
|
88
|
+
* export const { op } = TerraformWatchOp({
|
|
89
|
+
* name: "app-plan",
|
|
90
|
+
* root: "app",
|
|
91
|
+
* findingMode: "comment",
|
|
92
|
+
* });
|
|
93
|
+
*
|
|
83
94
|
* // nightly, opening an issue when the plan is non-empty
|
|
84
95
|
* export const { op } = TerraformWatchOp({
|
|
85
96
|
* name: "app-watch",
|
|
@@ -102,8 +113,14 @@ import { OpResource } from "@intentius/chant/op";
|
|
|
102
113
|
* What to do with a non-empty plan. A subset of core's `OpFindingMode`
|
|
103
114
|
* (`packages/core/src/lexicon.ts`): `merge-request` is GitLab's spelling of
|
|
104
115
|
* `pull-request` and is produced by the CI generator, not chosen here.
|
|
116
|
+
*
|
|
117
|
+
* `comment` (#2231) is the mode a plan-on-pull-request Op wants: the plan
|
|
118
|
+
* lands as one comment on the pull request that triggered the run and the
|
|
119
|
+
* next push edits that same comment. It needs a `pull_request` trigger on the
|
|
120
|
+
* `ScheduledOpSpec` the workflow is generated from, and the github generator
|
|
121
|
+
* refuses it by name on any other trigger.
|
|
105
122
|
*/
|
|
106
|
-
export type TerraformFindingMode = "report" | "issue" | "pull-request";
|
|
123
|
+
export type TerraformFindingMode = "report" | "issue" | "comment" | "pull-request";
|
|
107
124
|
export interface TerraformWatchOpConfig {
|
|
108
125
|
/** Op name (kebab-case). */
|
|
109
126
|
name: string;
|
|
@@ -129,8 +146,14 @@ export interface TerraformWatchOpConfig {
|
|
|
129
146
|
* Declared here rather than detected, because a composite is built by
|
|
130
147
|
* `chant build` without reading a root module's `.tf` files. The activities
|
|
131
148
|
* detect the estate at run time (`op/activities/live-detect.ts`), but by then
|
|
132
|
-
* the phases are already serialized.
|
|
133
|
-
*
|
|
149
|
+
* the phases are already serialized.
|
|
150
|
+
*
|
|
151
|
+
* Two things check the answer against the root's real mode, since a wrong
|
|
152
|
+
* one is otherwise silent (#2216). This function refuses a mismatch outright
|
|
153
|
+
* when it can resolve the mode synchronously, which is a
|
|
154
|
+
* `chant.config.json` project (`op/resolve-root-mode.ts`); TF028
|
|
155
|
+
* (`lint/post-synth/tf028.ts`) reports the same mismatch off the parsed HCL
|
|
156
|
+
* for every project, `chant.config.ts` included.
|
|
134
157
|
*/
|
|
135
158
|
live?: boolean;
|
|
136
159
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terraform-watch-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-watch-op.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"terraform-watch-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-watch-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GG;AAEH,OAAO,EAAa,UAAU,EAAqB,MAAM,qBAAqB,CAAC;AAS/E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;AAEnF,MAAM,WAAW,sBAAsB;IACrC,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,+GAA+G;IAC/G,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,yBAAyB,CA8G1F"}
|
package/dist/hcl/parse.d.ts
CHANGED
|
@@ -205,6 +205,20 @@ export declare function parseTerraformRootDir(dir: string, root: string, hcl2jso
|
|
|
205
205
|
* the same way `parseTerraformRootDir`'s callers exercise it against files.
|
|
206
206
|
*/
|
|
207
207
|
export declare function parseTerraformRootContent(content: string, root: string, hcl2json?: Hcl2Json, modeOptions?: TerraformRootModeOptions): Promise<Map<string, Declarable>>;
|
|
208
|
+
/** The root name an audit of the audited directory itself parses under. */
|
|
209
|
+
export declare const AUDIT_ROOT_NAME = "audit-root";
|
|
210
|
+
/**
|
|
211
|
+
* The root name one `chant audit` input parses under (#2217).
|
|
212
|
+
*
|
|
213
|
+
* A build names its roots from `terraform.roots`; an audit has no such
|
|
214
|
+
* config, so the name comes from the input's own path, which is the one thing
|
|
215
|
+
* that tells two discovered roots apart. `envs/prod` becomes `envs.prod`,
|
|
216
|
+
* because an entity key is `<root>/<address>` with the module chain between
|
|
217
|
+
* them and a `/` inside the root name would read as a module scope. The
|
|
218
|
+
* audited directory itself keeps the name {@link AUDIT_ROOT_NAME}, so a
|
|
219
|
+
* single-root audit reads the way it did before an input path was available.
|
|
220
|
+
*/
|
|
221
|
+
export declare function auditRootName(path?: string): string;
|
|
208
222
|
/**
|
|
209
223
|
* The module scope an entity key names: the part before the address.
|
|
210
224
|
*
|
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,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjD,8EAA8E;AAC9E,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE;QACd,kFAAkF;QAClF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,qFAAqF;QACrF,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;QACzB,6DAA6D;QAC7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,kDAAkD;QAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB;;;;;;;;;;;;WAYG;QACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QACrC;;;;;;;WAOG;QACH,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;QA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AE,aAAa,EACvB,OAAO,GAAE,SAAS,MAAM,EAAO,GAC9B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CA6GlC;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,QAAQ,EACnB,WAAW,CAAC,EAAE,wBAAwB,EACtC,OAAO,GAAE,SAAS,MAAM,EAAO,GAC9B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAUlC;AAED;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,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/integrity.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "f525c4a58d5f0d1e9b6ab47756dc039e0fb7a82f2e471efebb0c93db9aa0ea8b",
|
|
5
5
|
"meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
|
|
6
6
|
"types/index.d.ts": "022927e6a7b351cc4cf52d5f973f60ccd140e5810e17b32fb8868965aa1db161",
|
|
7
7
|
"rules/plan-before-apply.ts": "31b1b3176799fd365b2583fe3947edd187c2a863e3dc0094ed9e91ece2464c99",
|
|
8
8
|
"rules/blocks.ts": "d69f65c13b44ff425ccd465644f41c160e07b4c221bd60698d3ec84bf5d9cef8",
|
|
9
9
|
"rules/module-source.ts": "147025cf53eba006473ddcb771bf7452928fc476e6daee10bbb86bcc7ee3848a",
|
|
10
10
|
"rules/scope.ts": "a6d327d821f219c98a9d4ae6e6eed6325f3d3edf6286f3622b41be591d190dc8",
|
|
11
|
-
"rules/tf001.ts": "
|
|
11
|
+
"rules/tf001.ts": "1f07f0f9172a7ddb9c726ba4be1bea08e54e25701fbe59cc54c3cf4401aca999",
|
|
12
12
|
"rules/tf002.ts": "27720fcb578cceb1bfff86849d46b0309276f5a88d092eddcb7d7b961d1f5cd8",
|
|
13
13
|
"rules/tf003.ts": "7b705a08f03769f353910e524bb3f1b4cc844bcb620e240a9063288d0fd60802",
|
|
14
14
|
"rules/tf004.ts": "59ef2108aa561cc6a40cd970fc54604be60872b51a035ed3bc3c53346a31d358",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"rules/tf012.ts": "071d542786a1d5c19d485ab3e8fadb16210ba1c90a51843bf18b620cf99fe2a3",
|
|
23
23
|
"rules/tf013.ts": "096c3e7e51a8a54fd4354f6a93dc1f3540e155ef5e6ef39407904465803aaa2c",
|
|
24
24
|
"rules/tf014.ts": "c17d6c75fe0d38984a0108f4238667e9c069a0a761811d59f8ef9f67b5d8c5f3",
|
|
25
|
-
"rules/tf015.ts": "
|
|
25
|
+
"rules/tf015.ts": "7190c71139f66ed0862725aead01b5eb3e6d366d1318a0506060b4c3d2417364",
|
|
26
26
|
"rules/tf016.ts": "4dc8a815ee91bac7551bde90af0f5315bd8c03a0a090f19bd62ad305e0a06c93",
|
|
27
27
|
"rules/tf017.ts": "1b11c1a21aca33f5e634732fd23b57ac4c2e02af9ef531890d88c401fa593832",
|
|
28
28
|
"rules/tf018.ts": "188a56a73c53423ce4b653540cb4ab2b7aa64d10bb9bad090d392e2bfd821d0a",
|
|
@@ -32,8 +32,10 @@
|
|
|
32
32
|
"rules/tf022.ts": "87483762b02e947aba94ec9b79fb9bf4dd6442287d602836306bc66b4a239a35",
|
|
33
33
|
"rules/tf024.ts": "c0c101f913bd3d0fdb5403ee57888e80d8fc612e363f0eb43d7ae759ac1d5651",
|
|
34
34
|
"rules/tf025.ts": "0c31be3885e940e2b3e9ac8e023067d8d6e2b42c04f628890405c9fc6db7d1ce",
|
|
35
|
-
"rules/tf026.ts": "
|
|
35
|
+
"rules/tf026.ts": "8cf1e61bc9563aa2d3c149f243ffa02ad4f183eebb672f861cd6c4e6fba1d310",
|
|
36
|
+
"rules/tf027.ts": "0a6062a230cdaa707f82b2353be4b34dff81322d24075d46f732a47bcef15893",
|
|
37
|
+
"rules/tf028.ts": "81ef95659c40ad1774c83e663473ed769143d894a4ba0517c3defa31f00ba723",
|
|
36
38
|
"skills/chant-terraform.md": "d9ca7b7c28aed0038ce775a3491150298492eed2858fd3651ed9bfca0e577ae8"
|
|
37
39
|
},
|
|
38
|
-
"composite": "
|
|
40
|
+
"composite": "bb5ab5b3b01e2194940123f31b4bec3eb979c9d393449baf03e181f4f65ba3ee"
|
|
39
41
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Every post-synth check needs an entry or it contributes nothing to
|
|
5
5
|
* `chant audit`, silently, and `packages/core/src/audit/catalog.test.ts` fails.
|
|
6
6
|
*
|
|
7
|
-
* TF001
|
|
8
|
-
* never emitted output, so `yamlBased` is false for all
|
|
7
|
+
* TF001 and TF024 through TF028 all read the chant model (`ctx.entities`),
|
|
8
|
+
* never emitted output, so `yamlBased` is false for all of them. Prior-art
|
|
9
9
|
* lineage lives in ./audit-lineage.ts.
|
|
10
10
|
*/
|
|
11
11
|
import type { RuleMeta } from "@intentius/chant/audit/catalog";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAe1E,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAe1E,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CA6R1D,CAAC"}
|
|
@@ -42,26 +42,37 @@
|
|
|
42
42
|
* TF021) added `gcp-terraform-best-practices`, the last row of the table below
|
|
43
43
|
* that no shipped rule had cited yet.
|
|
44
44
|
*
|
|
45
|
+
* Each row's Sweep note says whether `scripts/prior-art-sweep.ts` can index the
|
|
46
|
+
* source and, when it cannot, why (#2219). Five of these are indexed as of
|
|
47
|
+
* 2026-09-07: the three tflint rulesets, tfsec and the Sentinel policy set,
|
|
48
|
+
* 311 upstream rule ids in `scripts/prior-art/snapshot.json`. The rest are
|
|
49
|
+
* prose or code, so the tools they credit are re-read by hand when their
|
|
50
|
+
* documents change.
|
|
51
|
+
*
|
|
45
52
|
* | Key | Name | URL | Licence | Kind | Note |
|
|
46
53
|
* |---|---|---|---|---|---|
|
|
47
|
-
* | `tflint` | tflint | https://github.com/terraform-linters/tflint | MPL-2.0 (its `terraform` package is BUSL-1.1; binaries are bound by both) | scanner | The plugin host; ships no language rules of its own. |
|
|
48
|
-
* | `tflint-ruleset-terraform` | tflint-ruleset-terraform | https://github.com/terraform-linters/tflint-ruleset-terraform | MPL-2.0 | scanner | The official language-level ruleset, bundled into tflint. |
|
|
49
|
-
* | `tflint-ruleset-redeploy` | tflint-ruleset-redeploy | https://github.com/RedeployAB/tflint-ruleset-redeploy | 0BSD | scanner | Community ruleset; richest source of language-level rules outside the official set. |
|
|
50
|
-
* | `tflint-ruleset-avm` | tflint-ruleset-avm | https://github.com/Azure/tflint-ruleset-avm | MIT | scanner | Azure Verified Modules conformance; two of its 33 rules are provider-agnostic. |
|
|
51
|
-
* | `tfsec` | tfsec | https://github.com/aquasecurity/tfsec | MIT | scanner | Historical: not archived but effectively frozen (no release since 2025-05); its docs site 404s above v0.61.x, so cite pinned repository paths (`github.com/aquasecurity/tfsec/blob/master/docs/checks/...`), not the docs site. |
|
|
52
|
-
* | `trivy-checks` | trivy-checks | https://github.com/aquasecurity/trivy-checks | MIT (not the trivy scanner's own Apache-2.0; cite the checks repo's licence, not the engine's) | scanner | Where tfsec's rules live today (tfsec -> defsec -> trivy + trivy-checks). Cite rules by `long_id` (stable, human-readable); `AVD-*` ids are aliases now. |
|
|
53
|
-
* | `terraform-sentinel-policies` | HashiCorp reference Sentinel policies | https://github.com/hashicorp/terraform-sentinel-policies | MPL-2.0 | specification | HashiCorp's own example policy set; ships zero rules baked into HCP Terraform itself, so treat a cited policy as a documented pattern (`specification`) unless a future entry runs it as a real check (`scanner`); the `kind` union allows either. |
|
|
54
|
-
* | `choudoufu` | choudoufu | https://github.com/INTENTIUS/choudoufu | MPL-2.0 | scanner | Its `internal/live/lint` package; experimental, AWS-only. |
|
|
55
|
-
* | `hashicorp-style-guide` | HashiCorp Terraform style guide | https://developer.hashicorp.com/terraform/language/style | n/a | specification | |
|
|
56
|
-
* | `gcp-terraform-best-practices` | Google Cloud Terraform best-practices series | https://docs.cloud.google.com/docs/terraform/best-practices/general-style-structure | n/a | specification | A multi-page series; cite the specific page's fragment. |
|
|
57
|
-
* | `aws-terraform-prescriptive-guidance` | AWS prescriptive guidance for Terraform | https://docs.aws.amazon.com/prescriptive-guidance/latest/terraform-aws-provider-best-practices/ | n/a | specification | |
|
|
54
|
+
* | `tflint` | tflint | https://github.com/terraform-linters/tflint | MPL-2.0 (its `terraform` package is BUSL-1.1; binaries are bound by both) | scanner | The plugin host; ships no language rules of its own. Sweep: not registered in `PRIOR_ART` (no rule cites it), so it is not swept. |
|
|
55
|
+
* | `tflint-ruleset-terraform` | tflint-ruleset-terraform | https://github.com/terraform-linters/tflint-ruleset-terraform | MPL-2.0 | scanner | The official language-level ruleset, bundled into tflint. Sweep: indexed from `docs/rules/README.md`, whose table links each rule's page (20 rules). |
|
|
56
|
+
* | `tflint-ruleset-redeploy` | tflint-ruleset-redeploy | https://github.com/RedeployAB/tflint-ruleset-redeploy | 0BSD | scanner | Community ruleset; richest source of language-level rules outside the official set. Sweep: indexed from `docs/rules/README.md`, same table shape (33 rules). |
|
|
57
|
+
* | `tflint-ruleset-avm` | tflint-ruleset-avm | https://github.com/Azure/tflint-ruleset-avm | MIT | scanner | Azure Verified Modules conformance; two of its 33 rules are provider-agnostic. Sweep: indexed from the repository-root `RULES.md`, since `docs/` holds pages for only two rules (33 rules). |
|
|
58
|
+
* | `tfsec` | tfsec | https://github.com/aquasecurity/tfsec | MIT | scanner | Historical: not archived but effectively frozen (no release since 2025-05); its docs site 404s above v0.61.x, so cite pinned repository paths (`github.com/aquasecurity/tfsec/blob/master/docs/checks/...`), not the docs site. Sweep: indexed from the root `rules.md` on `master`, a flat table of all 152 check ids, because `docs/checks` nests a directory per provider, service and check. |
|
|
59
|
+
* | `trivy-checks` | trivy-checks | https://github.com/aquasecurity/trivy-checks | MIT (not the trivy scanner's own Apache-2.0; cite the checks repo's licence, not the engine's) | scanner | Where tfsec's rules live today (tfsec -> defsec -> trivy + trivy-checks). Cite rules by `long_id` (stable, human-readable); `AVD-*` ids are aliases now. Sweep: not registered in `PRIOR_ART` (no rule cites it yet) and its `long_id`s live in Rego metadata under `checks/<kind>/<provider>/<service>/`, with no flat index. |
|
|
60
|
+
* | `terraform-sentinel-policies` | HashiCorp reference Sentinel policies | https://github.com/hashicorp/terraform-sentinel-policies | MPL-2.0 | specification | HashiCorp's own example policy set; ships zero rules baked into HCP Terraform itself, so treat a cited policy as a documented pattern (`specification`) unless a future entry runs it as a real check (`scanner`); the `kind` union allows either. Sweep: indexed by listing the five per-cloud directories, whose `.sentinel` filenames are the policy ids credits cite (73 policies); the repository publishes no index page. |
|
|
61
|
+
* | `choudoufu` | choudoufu | https://github.com/INTENTIUS/choudoufu | MPL-2.0 | scanner | Its `internal/live/lint` package; experimental, AWS-only. Sweep: unsweepable, its rule ids are Go constants in `internal/live/lint/issue.go` and it publishes no rule index. |
|
|
62
|
+
* | `hashicorp-style-guide` | HashiCorp Terraform style guide | https://developer.hashicorp.com/terraform/language/style | n/a | specification | Sweep: unsweepable, one prose page of recommendations with no rule ids; a credit quotes the sentence and links its fragment. |
|
|
63
|
+
* | `gcp-terraform-best-practices` | Google Cloud Terraform best-practices series | https://docs.cloud.google.com/docs/terraform/best-practices/general-style-structure | n/a | specification | A multi-page series; cite the specific page's fragment. Sweep: unsweepable, prose across several pages with no rule ids. |
|
|
64
|
+
* | `aws-terraform-prescriptive-guidance` | AWS prescriptive guidance for Terraform | https://docs.aws.amazon.com/prescriptive-guidance/latest/terraform-aws-provider-best-practices/ | n/a | specification | Sweep: unsweepable, a prose guide whose sections carry headings rather than rule ids. |
|
|
58
65
|
*
|
|
59
66
|
* Deliberately excluded, per the survey: Terrascan and regula (both archived,
|
|
60
67
|
* do not build on dead projects); Snyk IaC (a product, not a rule source);
|
|
61
68
|
* semgrep (no SPDX id: its engine is LGPL-2.1 but its rules ship under the
|
|
62
69
|
* proprietary Semgrep Rules License v1.0, which forbids redistribution; cite
|
|
63
70
|
* it by name in prose if a rule's idea comes from it, never register it in
|
|
64
|
-
* `PRIOR_ART` with an SPDX licence).
|
|
71
|
+
* `PRIOR_ART` with an SPDX licence). TF008 credits semgrep by name under that
|
|
72
|
+
* rule, so `PRIOR_ART` does carry the entry, with the licence spelled out
|
|
73
|
+
* rather than as an SPDX id. Sweep: unsweepable, the registry publishes no
|
|
74
|
+
* index and a rule id is the path of its YAML file under
|
|
75
|
+
* `terraform/<provider>/<category>/`, which no single directory listing covers.
|
|
65
76
|
*
|
|
66
77
|
* TF024 (#2103, live root declares a backend/cloud block) credits choudoufu's
|
|
67
78
|
* own `RuleStateBackend`, `internal/live/lint/issue.go` of
|
|
@@ -83,6 +94,22 @@
|
|
|
83
94
|
* activities/kubectl.ts`'s `ApplyDeleteMode`, `packages/core/src/op/
|
|
84
95
|
* activities/apply.ts`'s `DeleteMode`), applied here to a tool that does not
|
|
85
96
|
* itself carry the concept. Ship with no lineage rather than invent a credit.
|
|
97
|
+
*
|
|
98
|
+
* TF027 (#2216, a live root's `policy` block setting `undeclared_untagged =
|
|
99
|
+
* "delete"`) does have one: choudoufu's `RulePolicyScope`
|
|
100
|
+
* (`internal/live/lint/policy.go`) refuses the same assignment, and issue #67
|
|
101
|
+
* there makes it a lint refusal rather than a default. The relation is
|
|
102
|
+
* `extends`, because choudoufu refuses it only when no `scope` block narrows
|
|
103
|
+
* the purge, while chant refuses it either way: a `scope` block bounds an
|
|
104
|
+
* account-wide sweep to a service, type or region, and every resource inside
|
|
105
|
+
* that boundary is still one this estate never marked. "Bounded" is not
|
|
106
|
+
* "owned", and owning it is the condition chant applies.
|
|
107
|
+
*
|
|
108
|
+
* TF028 (#2216, a live root watched by a `TerraformWatchOp` built without
|
|
109
|
+
* `live: true`) has no entry. It reads a chant Op's own configuration against
|
|
110
|
+
* a root's mode, and no surveyed tool has an Op model to read: choudoufu lints
|
|
111
|
+
* HCL, and every tflint ruleset, tfsec/trivy-checks and the Sentinel policies
|
|
112
|
+
* do the same. There is nothing upstream to credit.
|
|
86
113
|
*/
|
|
87
114
|
import type { Lineage } from "@intentius/chant/audit/catalog";
|
|
88
115
|
export declare const terraformAuditLineage: Record<string, Lineage[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-lineage.d.ts","sourceRoot":"","sources":["../../src/lint/audit-lineage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"audit-lineage.d.ts","sourceRoot":"","sources":["../../src/lint/audit-lineage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAQ9D,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CA0R3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AA6BvE,eAAO,MAAM,eAAe,EAAE,cAAc,EA4B3C,CAAC"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TF001: a root module keeps its state on local disk.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* and
|
|
4
|
+
* Two ways a root gets there, and this reports both (#2218). A `terraform`
|
|
5
|
+
* block with no `backend "<type>"` and no `cloud {}` falls back to the local
|
|
6
|
+
* backend implicitly. A `backend "local"` block asks for the same backend by
|
|
7
|
+
* name. Either way `terraform.tfstate` lands in the working directory, and
|
|
8
|
+
* that file holds every attribute of every managed resource, secrets
|
|
9
|
+
* included, and it is not shared, not locked, and not versioned. The first
|
|
10
|
+
* apply from a second machine or a CI runner starts from an empty state and
|
|
11
|
+
* proposes to create the estate again.
|
|
12
|
+
*
|
|
13
|
+
* So the rule reads the backend block's TYPE LABEL rather than its presence:
|
|
14
|
+
* the id means "no remote backend", which is what its name, its message and
|
|
15
|
+
* its page have always argued. `cloud {}` counts as remote (it is Terraform
|
|
16
|
+
* Cloud / HCP state, held off the machine and locked). Every other backend
|
|
17
|
+
* type is taken as remote without a list to maintain, since `local` is the
|
|
18
|
+
* only backend Terraform ships that writes to the working directory.
|
|
19
|
+
*
|
|
20
|
+
* A root that keeps local state on purpose says so with a
|
|
21
|
+
* `# chant-ignore-block: TF001` on the line above its `terraform` block
|
|
22
|
+
* (chant #2111), which is what the three shipped examples do.
|
|
10
23
|
*
|
|
11
24
|
* One diagnostic per root, fired from the root's `terraform` block. A root
|
|
12
25
|
* with no `terraform` block at all is not flagged: it declares no version
|
|
@@ -31,5 +44,26 @@ import { type BlockBody } from "../../hcl/parse.js";
|
|
|
31
44
|
* this reads through it rather than re-deriving presence by hand.
|
|
32
45
|
*/
|
|
33
46
|
export declare function hasBlock(body: BlockBody, key: string): boolean;
|
|
47
|
+
/** The one backend type that writes state to the working directory. */
|
|
48
|
+
export declare const LOCAL_BACKEND = "local";
|
|
49
|
+
/**
|
|
50
|
+
* The type labels of the `backend` blocks in a `terraform` block body.
|
|
51
|
+
*
|
|
52
|
+
* `backend` takes one label, so hcl2json nests it one level deeper than an
|
|
53
|
+
* unlabelled block: `backend "s3" { bucket = "b" }` is
|
|
54
|
+
* `{ backend: { s3: [{ bucket: "b" }] } }`, where `cloud { ... }` is just
|
|
55
|
+
* `{ cloud: [{ ... }] }`. The keys of that inner object are the labels, which
|
|
56
|
+
* is the only place the type survives the parse. A malformed body that puts
|
|
57
|
+
* an array or a scalar under `backend` yields no labels, and the caller then
|
|
58
|
+
* treats the root as having no remote backend, the same verdict a missing
|
|
59
|
+
* block gets.
|
|
60
|
+
*/
|
|
61
|
+
export declare function backendTypes(body: BlockBody): string[];
|
|
62
|
+
/**
|
|
63
|
+
* Whether the body configures state somewhere other than the working
|
|
64
|
+
* directory: any `backend` block whose type is not `local`, or a `cloud`
|
|
65
|
+
* block.
|
|
66
|
+
*/
|
|
67
|
+
export declare function hasRemoteBackend(body: BlockBody): boolean;
|
|
34
68
|
export declare const tf001: PostSynthCheck;
|
|
35
69
|
//# sourceMappingURL=tf001.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tf001.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf001.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tf001.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf001.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAK9D;AAED,uEAAuE;AACvE,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,CAMtD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAGzD;AAED,eAAO,MAAM,KAAK,EAAE,cAmDnB,CAAC"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* TF015: a `backend` or `cloud` block inside a child module.
|
|
3
3
|
*
|
|
4
4
|
* Scope: child modules only. This is TF001's mirror image. TF001 wants a root
|
|
5
|
-
* module to declare a backend, because a root without one keeps its
|
|
6
|
-
* local disk. A child module must declare neither: state belongs to
|
|
5
|
+
* module to declare a REMOTE backend, because a root without one keeps its
|
|
6
|
+
* state on local disk. A child module must declare neither: state belongs to
|
|
7
|
+
* the root,
|
|
7
8
|
* one state per root however many modules it calls, and Terraform says so
|
|
8
9
|
* directly, "A backend block can only appear in the root module" and the
|
|
9
10
|
* same for `cloud`. Depending on the version, the block is ignored with a
|
|
@@ -15,6 +16,14 @@
|
|
|
15
16
|
* along. The rest of that block is fine to keep: `required_version` and
|
|
16
17
|
* `required_providers` are meaningful in a child module and are not reported
|
|
17
18
|
* here.
|
|
19
|
+
*
|
|
20
|
+
* Label-blind on purpose (#2218). TF001 had to start reading the backend
|
|
21
|
+
* block's type label, since `local` is the state placement it warns about
|
|
22
|
+
* rather than a cure for it. Nothing of the sort applies here: what a child
|
|
23
|
+
* module may not do is name a backend at all, `local` included, and
|
|
24
|
+
* Terraform's own refusal ("A backend block can only appear in the root
|
|
25
|
+
* module") does not read the label either. `hasBlock` is the right test, and
|
|
26
|
+
* the `positive` fixture's child declares `backend "local"` for that reason.
|
|
18
27
|
*/
|
|
19
28
|
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
20
29
|
export declare const tf015: PostSynthCheck;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tf015.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf015.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tf015.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf015.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAM1C,eAAO,MAAM,KAAK,EAAE,cAiCnB,CAAC"}
|
|
@@ -17,5 +17,12 @@
|
|
|
17
17
|
* the same entity TF024 and TF025 fire from.
|
|
18
18
|
*/
|
|
19
19
|
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
20
|
+
import { type BlockBody } from "../../hcl/parse.js";
|
|
21
|
+
/**
|
|
22
|
+
* The `policy { }` block nested in a `live { }` block's body, hcl2json's own
|
|
23
|
+
* "one block, wrapped in an array" shape. Exported for TF027 (`./tf027.ts`),
|
|
24
|
+
* which reads the other quadrant of the same block.
|
|
25
|
+
*/
|
|
26
|
+
export declare function policyBlockOf(liveBody: BlockBody): BlockBody | undefined;
|
|
20
27
|
export declare const tf026: PostSynthCheck;
|
|
21
28
|
//# sourceMappingURL=tf026.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tf026.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf026.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"tf026.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf026.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5D;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAKxE;AAED,eAAO,MAAM,KAAK,EAAE,cAyCnB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TF027: a live root's `policy` block sets `undeclared_untagged = "delete"`.
|
|
3
|
+
*
|
|
4
|
+
* The `undeclared_untagged` quadrant covers a live resource this estate never
|
|
5
|
+
* marked and the configuration does not declare, a resource chant does not
|
|
6
|
+
* own. `"delete"` there is account-scoped reconciliation: choudoufu compares
|
|
7
|
+
* the configuration against everything a `scope` block reaches and removes
|
|
8
|
+
* what is not in it. chant never proposes deleting a resource it does not
|
|
9
|
+
* own, and neither does an Op it generates, so the setting is refused on any
|
|
10
|
+
* live root the project builds, scoped or not. Narrowing the estate's own
|
|
11
|
+
* ownership answer (`undeclared_tagged`, which TF026 checks against
|
|
12
|
+
* `delete: "never"`) is the setting to reach for instead.
|
|
13
|
+
*
|
|
14
|
+
* `TerraformApplyOp` (`../../composites/terraform-apply-op.ts`) makes the
|
|
15
|
+
* same refusal when it builds, but only for a project on a `chant.config.json`
|
|
16
|
+
* whose root it can resolve synchronously (#2216): a `chant.config.ts` is
|
|
17
|
+
* project-authored code that `resolveRootModeSync` will not evaluate, so the
|
|
18
|
+
* composite reads the root as stock and never asks the policy question. This
|
|
19
|
+
* check reads `props.mode` off the parsed HCL instead, which the build stamps
|
|
20
|
+
* on every entity whatever the config file is written in, so it is the
|
|
21
|
+
* refusal that actually fires. It also fires for a live root with no apply Op
|
|
22
|
+
* at all, since the setting is a statement about the estate rather than about
|
|
23
|
+
* one Op.
|
|
24
|
+
*
|
|
25
|
+
* One diagnostic per root, fired from the root's `Terraform::Live` entity,
|
|
26
|
+
* the same entity TF024, TF025 and TF026 fire from.
|
|
27
|
+
*/
|
|
28
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
29
|
+
export declare const tf027: PostSynthCheck;
|
|
30
|
+
//# sourceMappingURL=tf027.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tf027.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf027.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAK1C,eAAO,MAAM,KAAK,EAAE,cAoCnB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TF028: a live root is watched by a `TerraformWatchOp` built in stock mode.
|
|
3
|
+
*
|
|
4
|
+
* `TerraformWatchOp`'s `live` flag is declared, not detected: a composite is
|
|
5
|
+
* built by `chant build` without reading a root module's `.tf` files, so the
|
|
6
|
+
* Op author says which shape the Plan phase takes and, until #2216, nothing
|
|
7
|
+
* checked the answer against the root. Leaving it off a live root is silent
|
|
8
|
+
* and lossy. `live: true` swaps the Plan step for `choudoufuLivePlan`, whose
|
|
9
|
+
* single read of the live system answers three questions (drift, how many
|
|
10
|
+
* live resources sit at a declared identity carrying no marker, and how many
|
|
11
|
+
* of those an exact content match makes claimable); a stock `terraformPlan`
|
|
12
|
+
* step answers the first alone, so the watch reports drift and stays quiet
|
|
13
|
+
* about every unowned and adoptable resource in the estate.
|
|
14
|
+
*
|
|
15
|
+
* The check runs over the whole built graph because that is where both halves
|
|
16
|
+
* of the question are: the root's mode is stamped on every parsed entity by
|
|
17
|
+
* the build (`props.mode`, #2103), and the Op is a `Chant::Op` entity carrying
|
|
18
|
+
* the composite's own labels. `TerraformWatchOp` itself cross-checks the flag
|
|
19
|
+
* where it can (`../../op/resolve-root-mode.ts`), but that read is a
|
|
20
|
+
* `chant.config.json`-only one, so on a `chant.config.ts` project, which is
|
|
21
|
+
* every project in this repository, this check is what actually fires.
|
|
22
|
+
*
|
|
23
|
+
* Read off the labels the composite stamps rather than off the emitted step,
|
|
24
|
+
* since a stock `terraformPlan -out` step against a live root is correct in
|
|
25
|
+
* `TerraformApplyOp`: choudoufu v0.13.0 accepts `plan -out` and re-plans
|
|
26
|
+
* against the file at apply (#2157), so the apply Op builds one shape for
|
|
27
|
+
* both kinds of root and the step alone says nothing about a mistake.
|
|
28
|
+
*
|
|
29
|
+
* One diagnostic per Op, fired from the Op's entity.
|
|
30
|
+
*/
|
|
31
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
32
|
+
export declare const tf028: PostSynthCheck;
|
|
33
|
+
//# sourceMappingURL=tf028.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tf028.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf028.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAuB1C,eAAO,MAAM,KAAK,EAAE,cAqCnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-keys.d.ts","sourceRoot":"","sources":["../../src/lsp/option-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,EAAE,SAAS,EAG5C,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,eAAe,EAAE,SAAS,EAMtC,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"option-keys.d.ts","sourceRoot":"","sources":["../../src/lsp/option-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,EAAE,SAAS,EAG5C,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,eAAe,EAAE,SAAS,EAMtC,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,SAAS,EAYpC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,eAAe,EAAE,SAAS,EAEtC,CAAC;AAQF,mGAAmG;AACnG,eAAO,MAAM,cAAc,EAAE,SAAS,EAKrC,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,cAAc,EAAE,SAAS,EAKrC,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,eAAe,EAAE,SAAS,EAStC,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,cAAc,EAAE,SAAS,EAIrC,CAAC;AAEF,oGAAoG;AACpG,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAK5D,CAAC;AAEF,iPAAiP;AACjP,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAC"}
|
package/dist/manifest.json
CHANGED
package/dist/okf/index.md
CHANGED
|
@@ -29,4 +29,6 @@ okf_version: '0.2'
|
|
|
29
29
|
* [TF024](/rules/TF024.md) - Live root declares a backend or cloud block, which choudoufu refuses
|
|
30
30
|
* [TF025](/rules/TF025.md) - Live root references a non-default terraform.workspace, which choudoufu refuses
|
|
31
31
|
* [TF026](/rules/TF026.md) - Live root declares delete: "never" but its policy leaves undeclared_tagged at "delete"
|
|
32
|
+
* [TF027](/rules/TF027.md) - Live root's policy block sets undeclared_untagged = "delete", which deletes resources chant does not own
|
|
33
|
+
* [TF028](/rules/TF028.md) - A live root is watched by a TerraformWatchOp built without live: true
|
|
32
34
|
* [TF101](/rules/TF101.md) - terraformApply's planFile must reference a preceding terraformPlan step.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: post-synth-check
|
|
3
|
+
title: TF027
|
|
4
|
+
description: Live root's policy block sets undeclared_untagged = "delete", which deletes resources chant does not own
|
|
5
|
+
id: TF027
|
|
6
|
+
severity: error
|
|
7
|
+
category: post-synth
|
|
8
|
+
lexicon: terraform
|
|
9
|
+
docs: https://intentius.io/chant/lexicons/terraform/rules/
|
|
10
|
+
---
|
|
11
|
+
Live root's policy block sets undeclared_untagged = "delete", which deletes resources chant does not own
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: post-synth-check
|
|
3
|
+
title: TF028
|
|
4
|
+
description: 'A live root is watched by a TerraformWatchOp built without live: true'
|
|
5
|
+
id: TF028
|
|
6
|
+
severity: error
|
|
7
|
+
category: post-synth
|
|
8
|
+
lexicon: terraform
|
|
9
|
+
docs: https://intentius.io/chant/lexicons/terraform/rules/
|
|
10
|
+
---
|
|
11
|
+
A live root is watched by a TerraformWatchOp built without live: true
|