@intentius/chant-lexicon-terraform 0.102.0 → 0.104.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.
Files changed (270) hide show
  1. package/dist/__fixtures__/terragrunt/affected-cases.d.ts +23 -0
  2. package/dist/__fixtures__/terragrunt/affected-cases.d.ts.map +1 -0
  3. package/dist/__fixtures__/terragrunt/record.d.ts +17 -0
  4. package/dist/__fixtures__/terragrunt/record.d.ts.map +1 -0
  5. package/dist/change-set.d.ts +67 -0
  6. package/dist/change-set.d.ts.map +1 -0
  7. package/dist/changed-roots.d.ts +30 -0
  8. package/dist/changed-roots.d.ts.map +1 -0
  9. package/dist/commands.d.ts +26 -0
  10. package/dist/commands.d.ts.map +1 -0
  11. package/dist/components/capability-plugin.d.ts +54 -0
  12. package/dist/components/capability-plugin.d.ts.map +1 -0
  13. package/dist/composites/terraform-pin-rollout-op.d.ts +44 -0
  14. package/dist/composites/terraform-pin-rollout-op.d.ts.map +1 -0
  15. package/dist/hcl/descend.d.ts +1 -1
  16. package/dist/hcl/descend.d.ts.map +1 -1
  17. package/dist/hcl/edges.d.ts +2 -2
  18. package/dist/hcl/edges.d.ts.map +1 -1
  19. package/dist/hcl/parse.d.ts +29 -1
  20. package/dist/hcl/parse.d.ts.map +1 -1
  21. package/dist/hcl/roots.d.ts +1 -1
  22. package/dist/hcl/roots.d.ts.map +1 -1
  23. package/dist/hcl/suppressions.d.ts.map +1 -1
  24. package/dist/index.d.ts +4 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/integrity.json +13 -4
  27. package/dist/lint/audit-catalog.d.ts.map +1 -1
  28. package/dist/lint/post-synth/index.d.ts.map +1 -1
  29. package/dist/lint/post-synth/module-source.d.ts +27 -1
  30. package/dist/lint/post-synth/module-source.d.ts.map +1 -1
  31. package/dist/lint/post-synth/terragrunt.d.ts +37 -0
  32. package/dist/lint/post-synth/terragrunt.d.ts.map +1 -0
  33. package/dist/lint/post-synth/tf002.d.ts +3 -1
  34. package/dist/lint/post-synth/tf002.d.ts.map +1 -1
  35. package/dist/lint/post-synth/tf038.d.ts +22 -0
  36. package/dist/lint/post-synth/tf038.d.ts.map +1 -0
  37. package/dist/lint/post-synth/tf039.d.ts +23 -0
  38. package/dist/lint/post-synth/tf039.d.ts.map +1 -0
  39. package/dist/lint/post-synth/tf040.d.ts +30 -0
  40. package/dist/lint/post-synth/tf040.d.ts.map +1 -0
  41. package/dist/lint/post-synth/tf041.d.ts +20 -0
  42. package/dist/lint/post-synth/tf041.d.ts.map +1 -0
  43. package/dist/lint/post-synth/tf042.d.ts +18 -0
  44. package/dist/lint/post-synth/tf042.d.ts.map +1 -0
  45. package/dist/lint/post-synth/tf043.d.ts +17 -0
  46. package/dist/lint/post-synth/tf043.d.ts.map +1 -0
  47. package/dist/lint/post-synth/tf044.d.ts +17 -0
  48. package/dist/lint/post-synth/tf044.d.ts.map +1 -0
  49. package/dist/lint/post-synth/tf045.d.ts +22 -0
  50. package/dist/lint/post-synth/tf045.d.ts.map +1 -0
  51. package/dist/manifest.json +1 -1
  52. package/dist/okf/index.md +8 -0
  53. package/dist/okf/rules/TF038.md +11 -0
  54. package/dist/okf/rules/TF039.md +11 -0
  55. package/dist/okf/rules/TF040.md +11 -0
  56. package/dist/okf/rules/TF041.md +11 -0
  57. package/dist/okf/rules/TF042.md +11 -0
  58. package/dist/okf/rules/TF043.md +11 -0
  59. package/dist/okf/rules/TF044.md +11 -0
  60. package/dist/okf/rules/TF045.md +11 -0
  61. package/dist/op/activities/index.d.ts +4 -0
  62. package/dist/op/activities/index.d.ts.map +1 -1
  63. package/dist/op/activities/pin-rollout.d.ts +46 -0
  64. package/dist/op/activities/pin-rollout.d.ts.map +1 -0
  65. package/dist/op/activities/terraform.d.ts +24 -50
  66. package/dist/op/activities/terraform.d.ts.map +1 -1
  67. package/dist/op/activity-contracts.d.ts +48 -0
  68. package/dist/op/activity-contracts.d.ts.map +1 -1
  69. package/dist/op/builders.d.ts +9 -0
  70. package/dist/op/builders.d.ts.map +1 -1
  71. package/dist/pin/edit-ts.d.ts +21 -0
  72. package/dist/pin/edit-ts.d.ts.map +1 -0
  73. package/dist/pin/edit.d.ts +52 -0
  74. package/dist/pin/edit.d.ts.map +1 -0
  75. package/dist/pin/forge.d.ts +39 -0
  76. package/dist/pin/forge.d.ts.map +1 -0
  77. package/dist/pin/index.d.ts +22 -0
  78. package/dist/pin/index.d.ts.map +1 -0
  79. package/dist/pin/rollout.d.ts +116 -0
  80. package/dist/pin/rollout.d.ts.map +1 -0
  81. package/dist/pin/scan.d.ts +54 -0
  82. package/dist/pin/scan.d.ts.map +1 -0
  83. package/dist/pin/source.d.ts +93 -0
  84. package/dist/pin/source.d.ts.map +1 -0
  85. package/dist/pin/waves.d.ts +66 -0
  86. package/dist/pin/waves.d.ts.map +1 -0
  87. package/dist/plan-digest.d.ts +59 -0
  88. package/dist/plan-digest.d.ts.map +1 -0
  89. package/dist/plugin.d.ts.map +1 -1
  90. package/dist/rules/module-source.ts +56 -1
  91. package/dist/rules/terragrunt.ts +76 -0
  92. package/dist/rules/tf002.ts +1 -1
  93. package/dist/rules/tf038.ts +71 -0
  94. package/dist/rules/tf039.ts +64 -0
  95. package/dist/rules/tf040.ts +76 -0
  96. package/dist/rules/tf041.ts +56 -0
  97. package/dist/rules/tf042.ts +42 -0
  98. package/dist/rules/tf043.ts +49 -0
  99. package/dist/rules/tf044.ts +51 -0
  100. package/dist/rules/tf045.ts +47 -0
  101. package/dist/terragrunt/affected.d.ts +119 -0
  102. package/dist/terragrunt/affected.d.ts.map +1 -0
  103. package/dist/terragrunt/index.d.ts +11 -0
  104. package/dist/terragrunt/index.d.ts.map +1 -0
  105. package/dist/terragrunt/mocks.d.ts +147 -0
  106. package/dist/terragrunt/mocks.d.ts.map +1 -0
  107. package/dist/terragrunt/run.d.ts +130 -0
  108. package/dist/terragrunt/run.d.ts.map +1 -0
  109. package/dist/terragrunt/units.d.ts +103 -0
  110. package/dist/terragrunt/units.d.ts.map +1 -0
  111. package/dist/terragrunt/wave.d.ts +89 -0
  112. package/dist/terragrunt/wave.d.ts.map +1 -0
  113. package/package.json +12 -2
  114. package/src/__fixtures__/change-set/choudoufu-set-plan.change-set.golden.json +95 -0
  115. package/src/__fixtures__/change-set/choudoufu-set-plan.json +76 -0
  116. package/src/__fixtures__/change-set/choudoufu.part.golden.json +173 -0
  117. package/src/__fixtures__/change-set/choudoufu.plan.json +610 -0
  118. package/src/__fixtures__/change-set/terraform.import-forget.plan.json +81 -0
  119. package/src/__fixtures__/change-set/terraform.part.golden.json +173 -0
  120. package/src/__fixtures__/change-set/terraform.plan.json +589 -0
  121. package/src/__fixtures__/change-set/tofu.part.golden.json +173 -0
  122. package/src/__fixtures__/change-set/tofu.plan.json +588 -0
  123. package/src/__fixtures__/change-set/v1.tf.txt +21 -0
  124. package/src/__fixtures__/change-set/v2-module-app.tf.txt +4 -0
  125. package/src/__fixtures__/change-set/v2.tf.txt +21 -0
  126. package/src/__fixtures__/pin/choudoufu-live-waves-n5.json +83 -0
  127. package/src/__fixtures__/pin/largeset-oci-n5/apply-order.txt +5 -0
  128. package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/estate.chdf.hcl +6 -0
  129. package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/main.tf +33 -0
  130. package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/estate.chdf.hcl +6 -0
  131. package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/main.tf +45 -0
  132. package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/estate.chdf.hcl +6 -0
  133. package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/main.tf +47 -0
  134. package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/estate.chdf.hcl +6 -0
  135. package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/main.tf +31 -0
  136. package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/estate.chdf.hcl +6 -0
  137. package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/main.tf +27 -0
  138. package/src/__fixtures__/pin/largeset-oci-n5/fixture.json +77 -0
  139. package/src/__fixtures__/plan-summary/largeset-n5-bump.json +2071 -0
  140. package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.json +95 -0
  141. package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.md +22 -0
  142. package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.txt +12 -0
  143. package/src/__fixtures__/terragrunt/affected/catalog/units/web/terragrunt.hcl +3 -0
  144. package/src/__fixtures__/terragrunt/affected/gitignore +3 -0
  145. package/src/__fixtures__/terragrunt/affected/live/dev/app/terragrunt.hcl +3 -0
  146. package/src/__fixtures__/terragrunt/affected/live/dev/vpc/terragrunt.hcl +3 -0
  147. package/src/__fixtures__/terragrunt/affected/live/prod/app/terragrunt.hcl +3 -0
  148. package/src/__fixtures__/terragrunt/affected/live/stg/terragrunt.stack.hcl +5 -0
  149. package/src/__fixtures__/terragrunt/affected/modules/app/main.tf +6 -0
  150. package/src/__fixtures__/terragrunt/affected/modules/app/policy.json +1 -0
  151. package/src/__fixtures__/terragrunt/affected/modules/net/main.tf +2 -0
  152. package/src/__fixtures__/terragrunt/affected/modules/thing/main.tf +3 -0
  153. package/src/__fixtures__/terragrunt/affected/root.hcl +5 -0
  154. package/src/__fixtures__/terragrunt/affected-cases.ts +126 -0
  155. package/src/__fixtures__/terragrunt/five-units/catalog/units/thing/terragrunt.hcl +3 -0
  156. package/src/__fixtures__/terragrunt/five-units/live/dev/app/terragrunt.hcl +13 -0
  157. package/src/__fixtures__/terragrunt/five-units/live/dev/db/terragrunt.hcl +8 -0
  158. package/src/__fixtures__/terragrunt/five-units/live/dev/vpc/terragrunt.hcl +3 -0
  159. package/src/__fixtures__/terragrunt/five-units/live/prod/app/terragrunt.hcl +8 -0
  160. package/src/__fixtures__/terragrunt/five-units/live/prod/vpc/terragrunt.hcl +3 -0
  161. package/src/__fixtures__/terragrunt/five-units/modules/thing/main.tf +7 -0
  162. package/src/__fixtures__/terragrunt/five-units/root.hcl +5 -0
  163. package/src/__fixtures__/terragrunt/record.ts +56 -0
  164. package/src/__fixtures__/terragrunt/recorded/affected-find.json +50 -0
  165. package/src/__fixtures__/terragrunt/recorded/failed-plan-report.json +36 -0
  166. package/src/__fixtures__/terragrunt/recorded/find.json +67 -0
  167. package/src/__fixtures__/terragrunt/recorded/version.txt +1 -0
  168. package/src/__fixtures__/terragrunt/recorded/wave-1/apply-report.json +22 -0
  169. package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/dev/vpc/tfplan.json +1 -0
  170. package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/prod/vpc/tfplan.json +1 -0
  171. package/src/__fixtures__/terragrunt/recorded/wave-1/plan-report.json +22 -0
  172. package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/dev/db/tfplan.json +1 -0
  173. package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/prod/app/tfplan.json +1 -0
  174. package/src/__fixtures__/terragrunt/recorded/wave-2/plan-report.json +22 -0
  175. package/src/change-set-combined-run.test.ts +156 -0
  176. package/src/change-set.test.ts +151 -0
  177. package/src/change-set.ts +273 -0
  178. package/src/changed-roots.test.ts +58 -0
  179. package/src/changed-roots.ts +102 -0
  180. package/src/commands.ts +112 -0
  181. package/src/components/capability-plugin.test.ts +91 -0
  182. package/src/components/capability-plugin.ts +131 -0
  183. package/src/components/pr-loop.tofu.test.ts +244 -0
  184. package/src/composites/terraform-pin-rollout-op.test.ts +69 -0
  185. package/src/composites/terraform-pin-rollout-op.ts +60 -0
  186. package/src/hcl/descend.ts +1 -1
  187. package/src/hcl/edges.ts +2 -2
  188. package/src/hcl/parse.test.ts +25 -0
  189. package/src/hcl/parse.ts +91 -6
  190. package/src/hcl/roots.ts +1 -1
  191. package/src/hcl/suppressions.ts +8 -2
  192. package/src/index.ts +18 -0
  193. package/src/lint/audit-catalog.ts +82 -0
  194. package/src/lint/audit.test.ts +3 -1
  195. package/src/lint/post-synth/fixtures/TF038/positive.tf +3 -0
  196. package/src/lint/post-synth/fixtures/TF039/positive.tf +4 -0
  197. package/src/lint/post-synth/fixtures/TF041/negative/terragrunt.hcl +12 -0
  198. package/src/lint/post-synth/fixtures/TF041/positive/terragrunt.hcl +7 -0
  199. package/src/lint/post-synth/fixtures/TF041/positive-apply/terragrunt.hcl +8 -0
  200. package/src/lint/post-synth/fixtures/TF042/negative/terragrunt.hcl +13 -0
  201. package/src/lint/post-synth/fixtures/TF042/positive/terragrunt.hcl +9 -0
  202. package/src/lint/post-synth/fixtures/TF043/negative/terragrunt.hcl +3 -0
  203. package/src/lint/post-synth/fixtures/TF043/negative-other/terragrunt.hcl +3 -0
  204. package/src/lint/post-synth/fixtures/TF043/positive-git/terragrunt.hcl +3 -0
  205. package/src/lint/post-synth/fixtures/TF043/positive-oci/terragrunt.hcl +3 -0
  206. package/src/lint/post-synth/fixtures/TF043/positive-tfr/terragrunt.hcl +3 -0
  207. package/src/lint/post-synth/fixtures/TF044/negative/terragrunt.hcl +9 -0
  208. package/src/lint/post-synth/fixtures/TF044/positive/terragrunt.hcl +7 -0
  209. package/src/lint/post-synth/fixtures/TF044/positive-generate/terragrunt.hcl +9 -0
  210. package/src/lint/post-synth/fixtures/TF045/negative/root.hcl +1 -0
  211. package/src/lint/post-synth/fixtures/TF045/negative/terragrunt.hcl +3 -0
  212. package/src/lint/post-synth/fixtures/TF045/positive/root.hcl +9 -0
  213. package/src/lint/post-synth/fixtures/TF045/positive/terragrunt.hcl +3 -0
  214. package/src/lint/post-synth/fixtures/TF045/unit-only/terragrunt.hcl +3 -0
  215. package/src/lint/post-synth/index.ts +16 -0
  216. package/src/lint/post-synth/module-source.test.ts +42 -1
  217. package/src/lint/post-synth/module-source.ts +56 -1
  218. package/src/lint/post-synth/terragrunt.ts +76 -0
  219. package/src/lint/post-synth/tf002.ts +1 -1
  220. package/src/lint/post-synth/tf038.test.ts +51 -0
  221. package/src/lint/post-synth/tf038.ts +71 -0
  222. package/src/lint/post-synth/tf039.test.ts +40 -0
  223. package/src/lint/post-synth/tf039.ts +64 -0
  224. package/src/lint/post-synth/tf040.test.ts +55 -0
  225. package/src/lint/post-synth/tf040.ts +76 -0
  226. package/src/lint/post-synth/tf041.test.ts +50 -0
  227. package/src/lint/post-synth/tf041.ts +56 -0
  228. package/src/lint/post-synth/tf042.test.ts +19 -0
  229. package/src/lint/post-synth/tf042.ts +42 -0
  230. package/src/lint/post-synth/tf043.test.ts +65 -0
  231. package/src/lint/post-synth/tf043.ts +49 -0
  232. package/src/lint/post-synth/tf044.test.ts +27 -0
  233. package/src/lint/post-synth/tf044.ts +51 -0
  234. package/src/lint/post-synth/tf045.test.ts +30 -0
  235. package/src/lint/post-synth/tf045.ts +47 -0
  236. package/src/op/activities/index.ts +4 -0
  237. package/src/op/activities/pin-rollout.ts +77 -0
  238. package/src/op/activities/terraform.test.ts +13 -0
  239. package/src/op/activities/terraform.ts +46 -86
  240. package/src/op/activity-contracts.test.ts +4 -1
  241. package/src/op/activity-contracts.ts +42 -0
  242. package/src/op/builders.ts +13 -0
  243. package/src/pin/bundle.test.ts +53 -0
  244. package/src/pin/edit-ts.test.ts +39 -0
  245. package/src/pin/edit-ts.ts +77 -0
  246. package/src/pin/edit.test.ts +199 -0
  247. package/src/pin/edit.ts +157 -0
  248. package/src/pin/forge.ts +85 -0
  249. package/src/pin/index.ts +22 -0
  250. package/src/pin/rollout.test.ts +232 -0
  251. package/src/pin/rollout.ts +451 -0
  252. package/src/pin/scan.ts +309 -0
  253. package/src/pin/source.ts +206 -0
  254. package/src/pin/waves.test.ts +101 -0
  255. package/src/pin/waves.ts +125 -0
  256. package/src/plan-digest.ts +99 -0
  257. package/src/plan-summary.test.ts +154 -0
  258. package/src/plugin.ts +25 -2
  259. package/src/terragrunt/affected.acceptance.test.ts +83 -0
  260. package/src/terragrunt/affected.test.ts +177 -0
  261. package/src/terragrunt/affected.ts +348 -0
  262. package/src/terragrunt/index.ts +11 -0
  263. package/src/terragrunt/mocks.acceptance.test.ts +105 -0
  264. package/src/terragrunt/mocks.test.ts +309 -0
  265. package/src/terragrunt/mocks.ts +324 -0
  266. package/src/terragrunt/run.ts +369 -0
  267. package/src/terragrunt/terragrunt.acceptance.test.ts +122 -0
  268. package/src/terragrunt/terragrunt.test.ts +332 -0
  269. package/src/terragrunt/units.ts +235 -0
  270. package/src/terragrunt/wave.ts +181 -0
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Changes to the `affected/` fixture and what each selects (#3415). Shared by
3
+ * `terragrunt/affected.test.ts`, which feeds the recorded `terragrunt` column
4
+ * to the selection, and `terragrunt/affected.acceptance.test.ts`, which makes
5
+ * each change as a commit and checks the column against a real Terragrunt.
6
+ *
7
+ * `terragrunt` is what Terragrunt's own `[base...HEAD]` filter selected
8
+ * (observed on 1.1.6 and 1.2.0-rc1). The supplement cases select nothing
9
+ * there: that column is the red half of each supplement.
10
+ */
11
+ import type { TerragruntAffectedUnit } from "../../terragrunt/affected.js";
12
+ export interface AffectedCase {
13
+ name: string;
14
+ /** Make the change in a copy of the fixture. */
15
+ change: (dir: string) => void;
16
+ /** What `git diff --name-only` lists for the change. */
17
+ changed: string[];
18
+ /** What Terragrunt's own git filter selects, catalog excluded. */
19
+ terragrunt: string[];
20
+ expected: TerragruntAffectedUnit[];
21
+ }
22
+ export declare const AFFECTED_CASES: AffectedCase[];
23
+ //# sourceMappingURL=affected-cases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"affected-cases.d.ts","sourceRoot":"","sources":["../../../src/__fixtures__/terragrunt/affected-cases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,wDAAwD;IACxD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,kEAAkE;IAClE,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC;AAID,eAAO,MAAM,cAAc,EAAE,YAAY,EAiGxC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Re-record `recorded/` from a real Terragrunt run over `five-units/`:
3
+ *
4
+ * PATH=<dir with terragrunt 1.1+ and tofu>:$PATH npx tsx lexicons/terraform/src/__fixtures__/terragrunt/record.ts
5
+ *
6
+ * It copies the fixture to a temporary directory, discovers the units, plans
7
+ * and applies wave 1, then plans wave 2, and writes what Terragrunt printed
8
+ * and wrote with the temporary directory's path taken out.
9
+ *
10
+ * `recorded/failed-plan-report.json` is not written here. It was recorded by
11
+ * hand with Terragrunt 1.1.6 and OpenTofu 1.12.5, planning `live/dev/db`,
12
+ * `live/dev/app` and `live/prod/app` in one run after giving `live/dev/db` a
13
+ * `before_hook` that runs `false` on plan: db fails, app exits early because
14
+ * db failed, and prod/app plans.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/__fixtures__/terragrunt/record.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Change-set adapters for the terraform family (#3181): a `terraform show
3
+ * -json` plan from terraform, tofu or choudoufu, and a choudoufu set plan
4
+ * document (`live-plan-set -json`, choudoufu#1752), each into
5
+ * `@intentius/chant/change-set` parts.
6
+ *
7
+ * A member's plan digest is {@link terraformPlanDigest}, the value a
8
+ * `TerraformApplyOp` gate on that root binds (#2300), so a change set over
9
+ * one root and a gate over the same root agree on what changed.
10
+ *
11
+ * This module imports `./plan-digest` and chant's `change-set` and
12
+ * `lifecycle/plan-digest` subpaths, never the lexicon's entry point, so it
13
+ * bundles without TypeScript or the lint rules (#3421).
14
+ */
15
+ import type { ChangeSetAction, ChangeSetPart, ChangeSetPlanner } from "@intentius/chant/change-set";
16
+ /**
17
+ * The planner a root's binary names: `choudoufu` and `tofu` by name, and
18
+ * `terraform` for anything else, a path to terraform included.
19
+ */
20
+ export declare function plannerForBinary(binary: string | undefined): ChangeSetPlanner;
21
+ /**
22
+ * The action a `resource_changes` entry's `actions` array means. Delete then
23
+ * create and create then delete are both a replace; the order is the
24
+ * disruption ({@link disruptionFor}).
25
+ */
26
+ export declare function actionFor(actions: unknown): ChangeSetAction;
27
+ /** A resource address's module path, name and index, read off the address when the entry does not carry them. */
28
+ export declare function parseTerraformAddress(address: string): {
29
+ module?: string;
30
+ type: string;
31
+ name: string;
32
+ index?: string | number;
33
+ };
34
+ export interface TerraformChangeSetPartInput {
35
+ /** The member's name: the root's name in `terraform.roots`, which a workspace member of kind terraform or choudoufu shares. */
36
+ member: string;
37
+ /** `terraform show -json <planfile>`, parsed. */
38
+ plan: unknown;
39
+ /** The binary that planned it, or the planner by name. Default `terraform`. */
40
+ planner?: ChangeSetPlanner;
41
+ /** The estate or workspace the root plans into. */
42
+ scope?: string;
43
+ /** The planner's own digest of this plan, when it printed one. */
44
+ nativeDigest?: string;
45
+ }
46
+ /**
47
+ * One terraform-family root's part, from its `show -json` plan.
48
+ *
49
+ * Every `resource_changes` entry becomes an entry, no-op and read included.
50
+ * A plan stock marked `errored` is a failed member: its entries are kept,
51
+ * but nothing should apply it.
52
+ */
53
+ export declare function terraformChangeSetPart(input: TerraformChangeSetPartInput): ChangeSetPart;
54
+ export interface ChoudoufuSetPlanInput {
55
+ /** `choudoufu live-plan-set -json`, parsed. */
56
+ document: unknown;
57
+ /** The member a root belongs to. Default: the root's directory as the set names it. */
58
+ memberFor?: (root: string, estate: string | undefined) => string;
59
+ }
60
+ /**
61
+ * One part per root of a choudoufu set plan (choudoufu#1752). A planned
62
+ * root is {@link terraformChangeSetPart} over its embedded plan, with the
63
+ * estate as scope and choudoufu's own root digest as `nativeDigest`. A
64
+ * failed root is a failed member with its error and no plan digest.
65
+ */
66
+ export declare function choudoufuSetPlanParts(input: ChoudoufuSetPlanInput): ChangeSetPart[];
67
+ //# sourceMappingURL=change-set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,eAAe,EAIf,aAAa,EACb,gBAAgB,EAEjB,MAAM,6BAA6B,CAAC;AAyBrC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,CAK7E;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAU3D;AAWD,iHAAiH;AACjH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAQ/H;AA2CD,MAAM,WAAW,2BAA2B;IAC1C,+HAA+H;IAC/H,MAAM,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,+EAA+E;IAC/E,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,aAAa,CAiDxF;AA6BD,MAAM,WAAW,qBAAqB;IACpC,+CAA+C;IAC/C,QAAQ,EAAE,OAAO,CAAC;IAClB,uFAAuF;IACvF,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,CAAC;CAClE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,aAAa,EAAE,CAwBnF"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Which `terraform.roots` a change touched (#3183), from the changed files
3
+ * alone.
4
+ *
5
+ * A root is hand-written HCL, not chant source, so `chant lifecycle affected`
6
+ * never sees it move: its artifact diff covers what chant builds. A pull
7
+ * request's plan needs the roots a change reaches, and this answers that
8
+ * from paths: a root is touched when a changed file sits in its directory,
9
+ * in a local module it calls (followed through modules that call modules),
10
+ * or is one of its var files.
11
+ *
12
+ * The module calls are read with a regex over the root's `.tf` and `.tofu`
13
+ * files, the way `./op/activities/live-detect.ts` reads a live block, so
14
+ * this stays out of the HCL parser's dependency graph. Only a `source` that
15
+ * starts with `./` or `../` is followed; a registry or git source is a
16
+ * version pin in the root's own files, which a change to it already touches.
17
+ */
18
+ import type { TerraformRootConfig } from "./config.js";
19
+ /**
20
+ * Every path, relative to `projectRoot`, whose change touches `root`: its
21
+ * directory, each local module it reaches, and its var files.
22
+ */
23
+ export declare function rootWatchPaths(projectRoot: string, root: Pick<TerraformRootConfig, "dir" | "varFiles">): string[];
24
+ /**
25
+ * The names of the roots in `roots` that a change to `changedFiles` touches,
26
+ * sorted. `changedFiles` are relative to `projectRoot` with `/` separators,
27
+ * as `git diff --name-only --relative` prints them.
28
+ */
29
+ export declare function changedRoots(projectRoot: string, roots: Record<string, Pick<TerraformRootConfig, "dir" | "varFiles">>, changedFiles: readonly string[]): string[];
30
+ //# sourceMappingURL=changed-roots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changed-roots.d.ts","sourceRoot":"","sources":["../src/changed-roots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAuCpD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG,MAAM,EAAE,CAajH;AAQD;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,GAAG,UAAU,CAAC,CAAC,EACpE,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,MAAM,EAAE,CAQV"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `chant terraform pin-rollout`: one run of a pin-bump rollout (#3189), from
3
+ * the command line. The `TerraformPinRolloutOp` composite runs the same code
4
+ * as an Op step.
5
+ *
6
+ * chant terraform pin-rollout --module <source> --from <pin> --to <pin>
7
+ * [--root <dir>]... [--depends-on <dir>=<dir>]... [--ts-source <dir>=<file>]...
8
+ * [--canary <dir>]... [--waves-from <live-waves.json> [--waves-prefix <dir>]]
9
+ * [--pull-request] [--base <branch>] [--remote <name>] [--applied-check <name>] [--json]
10
+ *
11
+ * Without `--pull-request` it reports the next wave and opens nothing. Exit
12
+ * 0 when the rollout is complete or a wave's PR was opened (or would be), 3
13
+ * when it is waiting on a merge or an apply (a gate is a fact, #2119), and 1
14
+ * when it stopped on a failed root or a closed PR.
15
+ */
16
+ import type { CommandGroup } from "@intentius/chant/cli/command-group";
17
+ import type { TerraformPinRolloutArgs } from "./op/activities/pin-rollout.js";
18
+ /** Parse the verb's flags into the activity's args. Throws on an unknown flag or a missing value. */
19
+ export declare function parsePinRolloutArgs(rawArgs: string[]): {
20
+ args: TerraformPinRolloutArgs;
21
+ json: boolean;
22
+ };
23
+ /** Exit status for a rollout's status. */
24
+ export declare function pinRolloutExitCode(status: string): number;
25
+ export declare const terraformCommands: CommandGroup;
26
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,oCAAoC,CAAC;AAE5F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAW3E,qGAAqG;AACrG,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAiDvG;AAED,0CAA0C;AAC1C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIzD;AAqBD,eAAO,MAAM,iBAAiB,EAAE,YAI/B,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * `terraformCapabilityPlugin` — the terraform lexicon's capability plugin
3
+ * (#3049). It contributes `terraform-apply`, which lets a component deploy a
4
+ * root named in `terraform.roots`, so a change across many roots runs as a
5
+ * `chant components fan-out`: in an order derived from each component's
6
+ * `dependsOn`, and, with `--wave-gate`, a gate per wave bound to the wave's
7
+ * set digest.
8
+ *
9
+ * The step is `{ kind: "terraform-apply", root: "<name>" }`, with optional
10
+ * `vars` (passed as `-var`, so `stackOutput()` can hand one root's output to
11
+ * another) and `cwd`. It works the same for `terraform`, `tofu` and
12
+ * `choudoufu`, since all three go through the lexicon's activities.
13
+ *
14
+ * ## Plan, then apply exactly that plan
15
+ *
16
+ * `plan` runs `init` and `plan -out`, and answers with the root as the member
17
+ * and `terraformPlanDigest` as its digest: the value a `TerraformApplyOp`
18
+ * gate on this root alone binds (#2300). A gated-wave fan-out folds those into
19
+ * the wave's set digest and hands the plan file back to `run`, which applies
20
+ * that file and nothing else. terraform and tofu refuse a saved plan whose
21
+ * state moved since it was written; choudoufu re-plans against the live
22
+ * system and refuses with exit 3 when its fresh plan differs (choudoufu
23
+ * #878). Either refusal fails the step.
24
+ *
25
+ * Run without a wave plan (`chant run --components`, or a fan-out with no
26
+ * wave gate), `run` plans and applies in one go, which is what `terraform
27
+ * apply` with no plan file does too.
28
+ */
29
+ import type { Capability } from "@intentius/chant/components/capability";
30
+ import { type CapabilityPlugin } from "@intentius/chant/components/capability-plugin";
31
+ /** The `terraform-apply` step's input. */
32
+ export interface TerraformApplyStepInput {
33
+ /** Key into `terraform.roots`. Also the member's name in a wave's set digest. */
34
+ root: string;
35
+ /** Input variables, after the root's var files. See `TerraformPlanArgs.vars`. */
36
+ vars?: Record<string, unknown>;
37
+ /** Where the `chant.config.*` search starts. Default: the current directory. */
38
+ cwd?: string;
39
+ }
40
+ /** What `terraform-apply` returns. `outputs` is what a dependent's `stackOutput()` reads. */
41
+ export interface TerraformApplyStepOutput {
42
+ root: string;
43
+ planDigest: string;
44
+ /** Whether the plan applied came from the wave's plan rather than one made here. */
45
+ fromWavePlan: boolean;
46
+ /** `terraform output -json`, as `{ name: value }`. */
47
+ outputs: Record<string, unknown>;
48
+ }
49
+ export declare const terraformApplyCapability: Capability<TerraformApplyStepInput, TerraformApplyStepOutput>;
50
+ export declare const TERRAFORM_VERB_FAMILIES: {
51
+ readonly apply: readonly ["terraform-apply"];
52
+ };
53
+ export declare const terraformCapabilityPlugin: CapabilityPlugin;
54
+ //# sourceMappingURL=capability-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-plugin.d.ts","sourceRoot":"","sources":["../../src/components/capability-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAiC,MAAM,wCAAwC,CAAC;AAExG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGzG,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,6FAA6F;AAC7F,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,YAAY,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAgCD,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,uBAAuB,EAAE,wBAAwB,CA6BlG,CAAC;AAEF,eAAO,MAAM,uBAAuB;aAClC,KAAK,YAAG,iBAAiB;CACjB,CAAC;AAEX,eAAO,MAAM,yBAAyB,EAAE,gBAWvC,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * TerraformPinRolloutOp composite (#3189): roll a module version out as
3
+ * pin-bump pull requests, one wave at a time.
4
+ *
5
+ * One phase, one `terraformPinRollout` step. Each run reads the rollout's
6
+ * state from the forge and opens at most the next wave's PR, so the Op is
7
+ * meant to run again: on a `schedule`, or from the pipeline that applies a
8
+ * merged wave. Wave N+1 opens only on a run after wave N's PR merged and each
9
+ * of its roots reported its apply check as passed on the merge commit. Until
10
+ * then a run reports where the rollout stands and opens nothing. A failed
11
+ * root fails the run, naming it.
12
+ *
13
+ * The run's `Rollout` outcome is the rollout's status: `opened`, `waiting`,
14
+ * `complete`, or `would-open` in report mode.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { TerraformPinRolloutOp } from "@intentius/chant-lexicon-terraform";
19
+ *
20
+ * export const { op } = TerraformPinRolloutOp({
21
+ * name: "vpc-1-4",
22
+ * module: "oci://registry.example.com/modules/vpc",
23
+ * from: "1.3.0",
24
+ * to: "1.4.0",
25
+ * canaries: ["live/dev/vpc"],
26
+ * mode: "pull-request",
27
+ * schedule: "*\/30 * * * *",
28
+ * });
29
+ * ```
30
+ */
31
+ import { OpResource } from "@intentius/chant/op";
32
+ import type { TerraformPinRolloutArgs } from "../op/activities/pin-rollout.js";
33
+ export interface TerraformPinRolloutOpConfig extends TerraformPinRolloutArgs {
34
+ /** Op name (kebab-case). */
35
+ name: string;
36
+ /** Cron expression, so the rollout re-reads the forge and moves on without anyone running it. */
37
+ schedule?: string;
38
+ }
39
+ export interface TerraformPinRolloutOpResources {
40
+ /** Op resource. One Rollout phase. */
41
+ op: InstanceType<typeof OpResource>;
42
+ }
43
+ export declare function TerraformPinRolloutOp(config: TerraformPinRolloutOpConfig): TerraformPinRolloutOpResources;
44
+ //# sourceMappingURL=terraform-pin-rollout-op.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terraform-pin-rollout-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-pin-rollout-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAa,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;IAC1E,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,8BAA8B;IAC7C,sCAAsC;IACtC,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,2BAA2B,GAAG,8BAA8B,CAYzG"}
@@ -46,7 +46,7 @@
46
46
  * half a root parsed is more useful than none of it.
47
47
  */
48
48
  import type { Declarable } from "@intentius/chant/declarable";
49
- import type { Hcl2Json } from "@intentius/chant/terraform/parse";
49
+ import type { Hcl2Json } from "@intentius/chant/terraform/hcl2json";
50
50
  import { type TerraformRootModeOptions } from "./parse.js";
51
51
  /** tflint's `--call-module-type`, with the same three states and the same default. */
52
52
  export type CallModuleType = "local" | "none" | "all";
@@ -1 +1 @@
1
- {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,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC,gEAAgE;IAChE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAuDD;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAC9B,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,aAAa,CAAC,CAiGxB"}
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * The `${...}` body is tokenized by hcl2json's own expression AST
16
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
17
+ * same instrument `packages/core/src/terraform/hcl2json.ts` uses for the carve-out
18
18
  * advisor, and for the same reason: a quoted address used as a map key
19
19
  * (`var.m["aws_s3_bucket.assets.arn"]`) and an escaped `$${...}` literal are
20
20
  * not references, and no regex over the raw string can tell. `./references.ts`
@@ -85,7 +85,7 @@
85
85
  */
86
86
  import { type Declarable } from "@intentius/chant/declarable";
87
87
  import type { EntityReference } from "@intentius/chant/graph-ir";
88
- import { type Hcl2Json } from "@intentius/chant/terraform/parse";
88
+ import { type Hcl2Json } from "@intentius/chant/terraform/hcl2json";
89
89
  import { type TerraformEntity } from "./parse.js";
90
90
  /**
91
91
  * Classify one AST traversal accessor. `var`/`local` are handled here because
@@ -1 +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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,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"}
@@ -17,7 +17,7 @@
17
17
  * core's exports map already carries (`"./*"` to `./src/*.ts`), so nothing
18
18
  * changed in `packages/core/package.json` for this.
19
19
  */
20
- import { type Hcl2Json } from "@intentius/chant/terraform/parse";
20
+ import { type Hcl2Json } from "@intentius/chant/terraform/hcl2json";
21
21
  import { type Declarable } from "@intentius/chant/declarable";
22
22
  import type { EntityReference } from "@intentius/chant/graph-ir";
23
23
  import type { SuppressionDirective } from "@intentius/chant/lint/suppressions";
@@ -75,6 +75,13 @@ export interface TerraformEntity extends Declarable {
75
75
  readonly mode?: TerraformRootMode;
76
76
  /** The declared estate name. Present only when `mode` is `"live"`. */
77
77
  readonly estate?: string;
78
+ /**
79
+ * Whether `.terraform.lock.hcl` sits beside the root's `.tf` files (#3190,
80
+ * TF040). Stamped on every entity of a root parsed from a directory, and
81
+ * absent when the parse had no directory to look in (a fetched
82
+ * repository, inline source), which reads as "not determined".
83
+ */
84
+ readonly lockFile?: boolean;
78
85
  /** `terraform.roots.<name>.workspace`, recorded so TF025 can flag a non-default one on a live root. */
79
86
  readonly workspace?: string;
80
87
  /**
@@ -156,6 +163,21 @@ export declare const OUTPUT_TYPE = "Terraform::Output";
156
163
  export declare const LOCALS_TYPE = "Terraform::Locals";
157
164
  /** A `live { estate = "..." }` block, or an `estate.chdf.hcl` sidecar's content (#2103). */
158
165
  export declare const LIVE_TYPE = "Terraform::Live";
166
+ /**
167
+ * Terragrunt config entities (#3417). A `terragrunt.hcl` or `root.hcl` is not
168
+ * a Terraform module, so its blocks are read into these types and never into
169
+ * `TERRAFORM_TYPE`: TF001's `required_version` check and the rest of the
170
+ * module rules keep to the `.tf` files.
171
+ */
172
+ export declare const TERRAGRUNT_CONFIG_TYPE = "Terraform::TerragruntConfig";
173
+ export declare const TERRAGRUNT_SOURCE_TYPE = "Terraform::TerragruntSource";
174
+ export declare const TERRAGRUNT_DEPENDENCY_TYPE = "Terraform::TerragruntDependency";
175
+ export declare const TERRAGRUNT_REMOTE_STATE_TYPE = "Terraform::TerragruntRemoteState";
176
+ export declare const TERRAGRUNT_GENERATE_TYPE = "Terraform::TerragruntGenerate";
177
+ /** The Terragrunt config files read, by their default names. A `--config` rename is not followed. */
178
+ export declare const TERRAGRUNT_FILENAMES: readonly string[];
179
+ /** Whether `name` (a bare filename) is a Terragrunt config file this lexicon reads. */
180
+ export declare function isTerragruntFileName(name: string): boolean;
159
181
  /** The sidecar filename choudoufu reads an estate declaration from when no in-block `live { }` is used. */
160
182
  export declare const LIVE_SIDECAR_FILENAME = "estate.chdf.hcl";
161
183
  /**
@@ -186,6 +208,8 @@ export interface TerraformFile {
186
208
  export declare function splitBundleContent(content: string, fallbackName?: string): TerraformFile[];
187
209
  /** Every `.tf` directly under `dir`, in filename order. Non-recursive. */
188
210
  export declare function listTerraformFiles(dir: string): string[];
211
+ /** The Terragrunt config files directly under `dir` (`root.hcl`, `terragrunt.hcl`), in filename order like the audit's bundle. */
212
+ export declare function listTerragruntFiles(dir: string): string[];
189
213
  /**
190
214
  * Read the `estate.chdf.hcl` sidecar beside `dir`'s `.tf` files, if present.
191
215
  * Sibling to {@link listTerraformFiles}: the sidecar is plain HCL (a bare
@@ -214,7 +238,11 @@ export interface TerraformRootModeOptions {
214
238
  * declaration silently overrides.
215
239
  */
216
240
  configEstate?: string;
241
+ /** Stamp `props.lockFile` on every entity (#3190). Set by the two directory-backed parses only. */
242
+ lockFile?: boolean;
217
243
  }
244
+ /** The lock file `terraform init` writes beside a root's `.tf` files. */
245
+ export declare const LOCK_FILENAME = ".terraform.lock.hcl";
218
246
  /**
219
247
  * Parse a set of files into entities keyed `<root>/<address>`. Two blocks that
220
248
  * genuinely share an address (two `locals` blocks, or the same address in two
@@ -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,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,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;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,MAAM,iBAAiB,GAAG,MAAM,G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ED;;;;;;;;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"}
@@ -26,7 +26,7 @@
26
26
  * that has not been read yet.
27
27
  */
28
28
  import { type Declarable } from "@intentius/chant/declarable";
29
- import type { Hcl2Json } from "@intentius/chant/terraform/parse";
29
+ import type { Hcl2Json } from "@intentius/chant/terraform/hcl2json";
30
30
  import type { TerraformRootConfig } from "../config.js";
31
31
  import { type CallModuleType } from "./descend.js";
32
32
  export interface TerraformRootsResult {
@@ -1 +1 @@
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,E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CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,oBAAoB,CAAC,CAiE/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"suppressions.d.ts","sourceRoot":"","sources":["../../src/hcl/suppressions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,oCAAoC,CAAC;AA0E/F,4FAA4F;AAC5F,MAAM,WAAW,QAAQ;IACvB,mFAAmF;IACnF,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACvC,+GAA+G;IAC/G,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAClD,kHAAkH;IAClH,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC;AAQD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CA8D3E;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIhF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAKvH"}
1
+ {"version":3,"file":"suppressions.d.ts","sourceRoot":"","sources":["../../src/hcl/suppressions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,oCAAoC,CAAC;AAgF/F,4FAA4F;AAC5F,MAAM,WAAW,QAAQ;IACvB,mFAAmF;IACnF,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACvC,+GAA+G;IAC/G,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAClD,kHAAkH;IAClH,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC;AAQD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CA8D3E;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIhF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAKvH"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  export { terraformPlugin } from "./plugin.js";
2
+ export { terraformCapabilityPlugin, terraformApplyCapability, TERRAFORM_VERB_FAMILIES, type TerraformApplyStepInput, type TerraformApplyStepOutput, } from "./components/capability-plugin.js";
2
3
  export { terraformSerializer } from "./serializer.js";
3
4
  export { terraformConfigSchema, terraformRootSchema, type TerraformConfig, type TerraformRootConfig, type TerraformConfigNamespace, } from "./config.js";
4
5
  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
6
  export { renderTerraformRoots, type TerraformRootsResult } from "./hcl/roots.js";
6
- export { terraformInit, terraformPlan, terraformApply, terraformShow, choudoufuLivePlan, choudoufuLiveLs, choudoufuLiveCheck, choudoufuAdopt, } from "./op/builders.js";
7
+ export { terraformInit, terraformPlan, terraformApply, terraformShow, choudoufuLivePlan, choudoufuLiveLs, choudoufuLiveCheck, choudoufuAdopt, terraformPinRollout, } from "./op/builders.js";
7
8
  export { parseAdoptionCommands, readAdoptionLedger, renderAdoptionLedger, type AdoptionCandidate, type AdoptionLedger, type AdoptionMatch, } from "./op/adoption.js";
8
9
  export { TerraformApplyOp } from "./composites/terraform-apply-op.js";
9
10
  export type { TerraformApplyOpConfig, TerraformApplyOpResources, TerraformGateMode, } from "./composites/terraform-apply-op.js";
@@ -11,6 +12,8 @@ export { TerraformWatchOp } from "./composites/terraform-watch-op.js";
11
12
  export type { TerraformWatchOpConfig, TerraformWatchOpResources, TerraformFindingMode, } from "./composites/terraform-watch-op.js";
12
13
  export { TerraformAdoptOp } from "./composites/terraform-adopt-op.js";
13
14
  export type { TerraformAdoptOpConfig, TerraformAdoptOpResources } from "./composites/terraform-adopt-op.js";
15
+ export { TerraformPinRolloutOp } from "./composites/terraform-pin-rollout-op.js";
16
+ export type { TerraformPinRolloutOpConfig, TerraformPinRolloutOpResources } from "./composites/terraform-pin-rollout-op.js";
14
17
  export { TERRAFORM_STATE_OWNERSHIP_KEYS } from "./state-ownership.js";
15
18
  export { predictTerraformBehaviour, terraformBehaviourRequest, terraformPredictOptionsFrom, TERRAFORM_REFERENCE_CATALOG, type TerraformBehaviourDeps, type TerraformBehaviourEntity, type TerraformBehaviourRequest, type TerraformBehaviourRequestOptions, type TerraformLiveRead, type TerraformPredictOptions, } from "./behaviour/index.js";
16
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version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,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,mBAAmB,GACpB,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;AAIzG,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,YAAY,EAAE,2BAA2B,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AAKzH,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAQnE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,aAAa,CAAC"}
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "d7619e357f8ddb66f17dd8331e2f4024d6a5b9d5e2bbf9fb1434d90eae5000a3",
4
+ "manifest.json": "bd1768b086e8eb1954c8d060a1aa3907c5696587083eca7934f8767f9f6c3b1d",
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/flat-attributes.ts": "135b4b118cb76ea7ef7a6f2851bb5c80d0907485b86a364c017f66388d0d4cb2",
10
- "rules/module-source.ts": "147025cf53eba006473ddcb771bf7452928fc476e6daee10bbb86bcc7ee3848a",
10
+ "rules/module-source.ts": "9e6e8f47725c3a01ee8b65b7acff6fe902bf5fc638820efdb5721f4c6ea9d95c",
11
11
  "rules/scope.ts": "a6d327d821f219c98a9d4ae6e6eed6325f3d3edf6286f3622b41be591d190dc8",
12
+ "rules/terragrunt.ts": "1973dbee0933db9593347aa662c71b86f02302c19a28f5ecba23a694ca96641b",
12
13
  "rules/tf001.ts": "1f07f0f9172a7ddb9c726ba4be1bea08e54e25701fbe59cc54c3cf4401aca999",
13
- "rules/tf002.ts": "27720fcb578cceb1bfff86849d46b0309276f5a88d092eddcb7d7b961d1f5cd8",
14
+ "rules/tf002.ts": "6759fe5135c85ed9016adbddd90e77743cdf243b261a98deb38e907da83c6d25",
14
15
  "rules/tf003.ts": "7b705a08f03769f353910e524bb3f1b4cc844bcb620e240a9063288d0fd60802",
15
16
  "rules/tf004.ts": "59ef2108aa561cc6a40cd970fc54604be60872b51a035ed3bc3c53346a31d358",
16
17
  "rules/tf005.ts": "17fbaf5ac205c8a768415eacd2cbfb7749e9a251c8f2d0c05dce7462db7fa821",
@@ -45,7 +46,15 @@
45
46
  "rules/tf035.ts": "2514b58731114a29c1a447a173d138c7e442ecb2a180da49929e1899ac6fd188",
46
47
  "rules/tf036.ts": "94fd91568341b6868ecd090772b93e675d2084547ae919586a496b9cb8a8f47b",
47
48
  "rules/tf037.ts": "d6fc1e8ab4478f7983f28c6679f56a3fcfe5f6a5fb2402981bbca98114b486bf",
49
+ "rules/tf038.ts": "8fc9549ce978509d4bd7e1d9f0835582e1fc851ba473501f56dfd176718b7590",
50
+ "rules/tf039.ts": "a1586874db83368230955feb6ce001653a2187e910a20ed3d76ff05feb36ce4f",
51
+ "rules/tf040.ts": "25fabeca489750075ed543d55dc86dd9950f3849e4c17b7073c7875bbb59ef0d",
52
+ "rules/tf041.ts": "9d78f6e0b0b90473cf88aa359a84110656ef1c72e5717184044e8c0bf4621bbb",
53
+ "rules/tf042.ts": "a7cf97666b1cd640aa77db26ed73a27db6669f52c3b681d89aa91c04a9955f83",
54
+ "rules/tf043.ts": "c8724a7c0734870101d73e411ed97240c03a01a1133adbf0b445a5083f40faee",
55
+ "rules/tf044.ts": "4e9b17a6080074d2b2e02862a9f1c9c2baf0ef32d4f3b48df1e62d9d8c362008",
56
+ "rules/tf045.ts": "760b1f4f385fbe7a86897efe3078fdeac11bcc9bfb806285d63db50488174b7b",
48
57
  "skills/chant-terraform.md": "d9ca7b7c28aed0038ce775a3491150298492eed2858fd3651ed9bfca0e577ae8"
49
58
  },
50
- "composite": "5cedcb8fdfd0bee9e59a770470ef1207999c624e87595866029b40b70ad8c96b"
59
+ "composite": "f25f33ea4418249a62b9cbb031d3334ff6eaa36ae60090593a9fa1a394047e09"
51
60
  }
@@ -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;AA+D1E,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CA8Y1D,CAAC"}
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;AA+D1E,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAge1D,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;AAsCvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAqC3C,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;AA8CvE,eAAO,MAAM,eAAe,EAAE,cAAc,EA6C3C,CAAC"}
@@ -18,12 +18,25 @@
18
18
  * recognize, scp-style `git@host:path` addresses, and any source ending in
19
19
  * `.git`. `local` is `./` or `../` (checkov's `UNKNOWN` case for module
20
20
  * pinning: a local path cannot be pinned to anything and is never flagged).
21
+ * `oci` is an OpenTofu `oci://host/repo` source (#3190). OpenTofu selects a
22
+ * version with `?tag=` or `?digest=` (https://opentofu.org/docs/language/modules/sources/),
23
+ * and a source naming neither resolves the `latest` tag. The container-image
24
+ * shapes `repo:tag` and `repo@sha256:...` are read too, so a source written
25
+ * the way `docker pull` spells it is not misread as unpinned. A `:` inside the
26
+ * host (a registry port) is never a tag: only a colon in the last path
27
+ * segment is. The tag and digest rules were checked against the docs page
28
+ * above; the suffix forms are not documented there and are not verified
29
+ * against OpenTofu's parser.
21
30
  */
22
- export type ModuleSourceKind = "local" | "registry" | "git" | "other";
31
+ export type ModuleSourceKind = "local" | "registry" | "git" | "oci" | "other";
23
32
  export interface ModuleSourceClassification {
24
33
  kind: ModuleSourceKind;
25
34
  /** The `?ref=`/`&ref=` value (falling back to `rev`), when `kind` is `"git"`. */
26
35
  ref?: string;
36
+ /** The tag an `oci://` source names, from `?tag=` or a `:tag` suffix on the repository. */
37
+ tag?: string;
38
+ /** The digest an `oci://` source names, from `?digest=` or an `@sha256:...` suffix. */
39
+ digest?: string;
27
40
  }
28
41
  export declare function classifyModuleSource(source: string): ModuleSourceClassification;
29
42
  /**
@@ -35,4 +48,17 @@ export declare function classifyModuleSource(source: string): ModuleSourceClassi
35
48
  export declare function isPinnedRef(ref: string): boolean;
36
49
  /** Is `ref` one of the well-known mutable branch names tflint's `flexible` style rejects, plus `trunk`. */
37
50
  export declare function isDefaultBranch(ref: string): boolean;
51
+ /**
52
+ * Is `tag` a name that conventionally moves (`latest`, a branch-like name)
53
+ * rather than an exact version. Used by TF038. A tag is a mutable pointer in
54
+ * most registries whatever it looks like, so the rule is a warning and this
55
+ * only decides what reads as obviously floating.
56
+ */
57
+ export declare function isMutableOciTag(tag: string): boolean;
58
+ /**
59
+ * Is a registry `version` constraint an exact version (`1.4.0`, `= 1.4.0`,
60
+ * `=1.4.0`) rather than a range (`~> 1.4`, `>= 1.4`, `>= 1.0, < 2.0`). Used
61
+ * by TF039. A bare version is an exact constraint in Terraform.
62
+ */
63
+ export declare function isExactVersionConstraint(version: string): boolean;
38
64
  //# sourceMappingURL=module-source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-source.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/module-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEtE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,gBAAgB,CAAC;IACvB,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAmDD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,0BAA0B,CAsB/E;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,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