@intentius/chant-lexicon-terraform 0.101.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 (374) 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/codegen/package.d.ts +1 -1
  10. package/dist/commands.d.ts +26 -0
  11. package/dist/commands.d.ts.map +1 -0
  12. package/dist/components/capability-plugin.d.ts +54 -0
  13. package/dist/components/capability-plugin.d.ts.map +1 -0
  14. package/dist/composites/terraform-pin-rollout-op.d.ts +44 -0
  15. package/dist/composites/terraform-pin-rollout-op.d.ts.map +1 -0
  16. package/dist/config.d.ts +3 -3
  17. package/dist/hcl/descend.d.ts +1 -1
  18. package/dist/hcl/descend.d.ts.map +1 -1
  19. package/dist/hcl/edges.d.ts +2 -2
  20. package/dist/hcl/edges.d.ts.map +1 -1
  21. package/dist/hcl/jsonencode.d.ts +106 -0
  22. package/dist/hcl/jsonencode.d.ts.map +1 -0
  23. package/dist/hcl/marker.d.ts.map +1 -1
  24. package/dist/hcl/parse.d.ts +29 -1
  25. package/dist/hcl/parse.d.ts.map +1 -1
  26. package/dist/hcl/roots.d.ts +1 -1
  27. package/dist/hcl/roots.d.ts.map +1 -1
  28. package/dist/hcl/suppressions.d.ts.map +1 -1
  29. package/dist/index.d.ts +4 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/integrity.json +22 -4
  32. package/dist/lint/audit-catalog.d.ts.map +1 -1
  33. package/dist/lint/audit-lineage.d.ts +1 -1
  34. package/dist/lint/audit-lineage.d.ts.map +1 -1
  35. package/dist/lint/post-synth/flat-attributes.d.ts +69 -0
  36. package/dist/lint/post-synth/flat-attributes.d.ts.map +1 -0
  37. package/dist/lint/post-synth/index.d.ts.map +1 -1
  38. package/dist/lint/post-synth/module-source.d.ts +27 -1
  39. package/dist/lint/post-synth/module-source.d.ts.map +1 -1
  40. package/dist/lint/post-synth/terragrunt.d.ts +37 -0
  41. package/dist/lint/post-synth/terragrunt.d.ts.map +1 -0
  42. package/dist/lint/post-synth/tf002.d.ts +3 -1
  43. package/dist/lint/post-synth/tf002.d.ts.map +1 -1
  44. package/dist/lint/post-synth/tf030.d.ts +51 -0
  45. package/dist/lint/post-synth/tf030.d.ts.map +1 -0
  46. package/dist/lint/post-synth/tf031.d.ts +55 -0
  47. package/dist/lint/post-synth/tf031.d.ts.map +1 -0
  48. package/dist/lint/post-synth/tf032.d.ts +71 -0
  49. package/dist/lint/post-synth/tf032.d.ts.map +1 -0
  50. package/dist/lint/post-synth/tf033.d.ts +50 -0
  51. package/dist/lint/post-synth/tf033.d.ts.map +1 -0
  52. package/dist/lint/post-synth/tf034.d.ts +25 -0
  53. package/dist/lint/post-synth/tf034.d.ts.map +1 -0
  54. package/dist/lint/post-synth/tf035.d.ts +33 -0
  55. package/dist/lint/post-synth/tf035.d.ts.map +1 -0
  56. package/dist/lint/post-synth/tf036.d.ts +33 -0
  57. package/dist/lint/post-synth/tf036.d.ts.map +1 -0
  58. package/dist/lint/post-synth/tf037.d.ts +31 -0
  59. package/dist/lint/post-synth/tf037.d.ts.map +1 -0
  60. package/dist/lint/post-synth/tf038.d.ts +22 -0
  61. package/dist/lint/post-synth/tf038.d.ts.map +1 -0
  62. package/dist/lint/post-synth/tf039.d.ts +23 -0
  63. package/dist/lint/post-synth/tf039.d.ts.map +1 -0
  64. package/dist/lint/post-synth/tf040.d.ts +30 -0
  65. package/dist/lint/post-synth/tf040.d.ts.map +1 -0
  66. package/dist/lint/post-synth/tf041.d.ts +20 -0
  67. package/dist/lint/post-synth/tf041.d.ts.map +1 -0
  68. package/dist/lint/post-synth/tf042.d.ts +18 -0
  69. package/dist/lint/post-synth/tf042.d.ts.map +1 -0
  70. package/dist/lint/post-synth/tf043.d.ts +17 -0
  71. package/dist/lint/post-synth/tf043.d.ts.map +1 -0
  72. package/dist/lint/post-synth/tf044.d.ts +17 -0
  73. package/dist/lint/post-synth/tf044.d.ts.map +1 -0
  74. package/dist/lint/post-synth/tf045.d.ts +22 -0
  75. package/dist/lint/post-synth/tf045.d.ts.map +1 -0
  76. package/dist/manifest.json +1 -1
  77. package/dist/okf/index.md +16 -0
  78. package/dist/okf/rules/TF030.md +11 -0
  79. package/dist/okf/rules/TF031.md +11 -0
  80. package/dist/okf/rules/TF032.md +11 -0
  81. package/dist/okf/rules/TF033.md +11 -0
  82. package/dist/okf/rules/TF034.md +11 -0
  83. package/dist/okf/rules/TF035.md +11 -0
  84. package/dist/okf/rules/TF036.md +11 -0
  85. package/dist/okf/rules/TF037.md +11 -0
  86. package/dist/okf/rules/TF038.md +11 -0
  87. package/dist/okf/rules/TF039.md +11 -0
  88. package/dist/okf/rules/TF040.md +11 -0
  89. package/dist/okf/rules/TF041.md +11 -0
  90. package/dist/okf/rules/TF042.md +11 -0
  91. package/dist/okf/rules/TF043.md +11 -0
  92. package/dist/okf/rules/TF044.md +11 -0
  93. package/dist/okf/rules/TF045.md +11 -0
  94. package/dist/op/activities/index.d.ts +4 -0
  95. package/dist/op/activities/index.d.ts.map +1 -1
  96. package/dist/op/activities/pin-rollout.d.ts +46 -0
  97. package/dist/op/activities/pin-rollout.d.ts.map +1 -0
  98. package/dist/op/activities/terraform.d.ts +24 -50
  99. package/dist/op/activities/terraform.d.ts.map +1 -1
  100. package/dist/op/activity-contracts.d.ts +66 -18
  101. package/dist/op/activity-contracts.d.ts.map +1 -1
  102. package/dist/op/builders.d.ts +9 -0
  103. package/dist/op/builders.d.ts.map +1 -1
  104. package/dist/pin/edit-ts.d.ts +21 -0
  105. package/dist/pin/edit-ts.d.ts.map +1 -0
  106. package/dist/pin/edit.d.ts +52 -0
  107. package/dist/pin/edit.d.ts.map +1 -0
  108. package/dist/pin/forge.d.ts +39 -0
  109. package/dist/pin/forge.d.ts.map +1 -0
  110. package/dist/pin/index.d.ts +22 -0
  111. package/dist/pin/index.d.ts.map +1 -0
  112. package/dist/pin/rollout.d.ts +116 -0
  113. package/dist/pin/rollout.d.ts.map +1 -0
  114. package/dist/pin/scan.d.ts +54 -0
  115. package/dist/pin/scan.d.ts.map +1 -0
  116. package/dist/pin/source.d.ts +93 -0
  117. package/dist/pin/source.d.ts.map +1 -0
  118. package/dist/pin/waves.d.ts +66 -0
  119. package/dist/pin/waves.d.ts.map +1 -0
  120. package/dist/plan-digest.d.ts +59 -0
  121. package/dist/plan-digest.d.ts.map +1 -0
  122. package/dist/plugin.d.ts.map +1 -1
  123. package/dist/rules/flat-attributes.ts +146 -0
  124. package/dist/rules/module-source.ts +56 -1
  125. package/dist/rules/terragrunt.ts +76 -0
  126. package/dist/rules/tf002.ts +1 -1
  127. package/dist/rules/tf030.ts +290 -0
  128. package/dist/rules/tf031.ts +370 -0
  129. package/dist/rules/tf032.ts +226 -0
  130. package/dist/rules/tf033.ts +160 -0
  131. package/dist/rules/tf034.ts +63 -0
  132. package/dist/rules/tf035.ts +74 -0
  133. package/dist/rules/tf036.ts +119 -0
  134. package/dist/rules/tf037.ts +101 -0
  135. package/dist/rules/tf038.ts +71 -0
  136. package/dist/rules/tf039.ts +64 -0
  137. package/dist/rules/tf040.ts +76 -0
  138. package/dist/rules/tf041.ts +56 -0
  139. package/dist/rules/tf042.ts +42 -0
  140. package/dist/rules/tf043.ts +49 -0
  141. package/dist/rules/tf044.ts +51 -0
  142. package/dist/rules/tf045.ts +47 -0
  143. package/dist/terragrunt/affected.d.ts +119 -0
  144. package/dist/terragrunt/affected.d.ts.map +1 -0
  145. package/dist/terragrunt/index.d.ts +11 -0
  146. package/dist/terragrunt/index.d.ts.map +1 -0
  147. package/dist/terragrunt/mocks.d.ts +147 -0
  148. package/dist/terragrunt/mocks.d.ts.map +1 -0
  149. package/dist/terragrunt/run.d.ts +130 -0
  150. package/dist/terragrunt/run.d.ts.map +1 -0
  151. package/dist/terragrunt/units.d.ts +103 -0
  152. package/dist/terragrunt/units.d.ts.map +1 -0
  153. package/dist/terragrunt/wave.d.ts +89 -0
  154. package/dist/terragrunt/wave.d.ts.map +1 -0
  155. package/package.json +13 -3
  156. package/src/__fixtures__/change-set/choudoufu-set-plan.change-set.golden.json +95 -0
  157. package/src/__fixtures__/change-set/choudoufu-set-plan.json +76 -0
  158. package/src/__fixtures__/change-set/choudoufu.part.golden.json +173 -0
  159. package/src/__fixtures__/change-set/choudoufu.plan.json +610 -0
  160. package/src/__fixtures__/change-set/terraform.import-forget.plan.json +81 -0
  161. package/src/__fixtures__/change-set/terraform.part.golden.json +173 -0
  162. package/src/__fixtures__/change-set/terraform.plan.json +589 -0
  163. package/src/__fixtures__/change-set/tofu.part.golden.json +173 -0
  164. package/src/__fixtures__/change-set/tofu.plan.json +588 -0
  165. package/src/__fixtures__/change-set/v1.tf.txt +21 -0
  166. package/src/__fixtures__/change-set/v2-module-app.tf.txt +4 -0
  167. package/src/__fixtures__/change-set/v2.tf.txt +21 -0
  168. package/src/__fixtures__/pin/choudoufu-live-waves-n5.json +83 -0
  169. package/src/__fixtures__/pin/largeset-oci-n5/apply-order.txt +5 -0
  170. package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/estate.chdf.hcl +6 -0
  171. package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/main.tf +33 -0
  172. package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/estate.chdf.hcl +6 -0
  173. package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/main.tf +45 -0
  174. package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/estate.chdf.hcl +6 -0
  175. package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/main.tf +47 -0
  176. package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/estate.chdf.hcl +6 -0
  177. package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/main.tf +31 -0
  178. package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/estate.chdf.hcl +6 -0
  179. package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/main.tf +27 -0
  180. package/src/__fixtures__/pin/largeset-oci-n5/fixture.json +77 -0
  181. package/src/__fixtures__/plan-summary/largeset-n5-bump.json +2071 -0
  182. package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.json +95 -0
  183. package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.md +22 -0
  184. package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.txt +12 -0
  185. package/src/__fixtures__/terragrunt/affected/catalog/units/web/terragrunt.hcl +3 -0
  186. package/src/__fixtures__/terragrunt/affected/gitignore +3 -0
  187. package/src/__fixtures__/terragrunt/affected/live/dev/app/terragrunt.hcl +3 -0
  188. package/src/__fixtures__/terragrunt/affected/live/dev/vpc/terragrunt.hcl +3 -0
  189. package/src/__fixtures__/terragrunt/affected/live/prod/app/terragrunt.hcl +3 -0
  190. package/src/__fixtures__/terragrunt/affected/live/stg/terragrunt.stack.hcl +5 -0
  191. package/src/__fixtures__/terragrunt/affected/modules/app/main.tf +6 -0
  192. package/src/__fixtures__/terragrunt/affected/modules/app/policy.json +1 -0
  193. package/src/__fixtures__/terragrunt/affected/modules/net/main.tf +2 -0
  194. package/src/__fixtures__/terragrunt/affected/modules/thing/main.tf +3 -0
  195. package/src/__fixtures__/terragrunt/affected/root.hcl +5 -0
  196. package/src/__fixtures__/terragrunt/affected-cases.ts +126 -0
  197. package/src/__fixtures__/terragrunt/five-units/catalog/units/thing/terragrunt.hcl +3 -0
  198. package/src/__fixtures__/terragrunt/five-units/live/dev/app/terragrunt.hcl +13 -0
  199. package/src/__fixtures__/terragrunt/five-units/live/dev/db/terragrunt.hcl +8 -0
  200. package/src/__fixtures__/terragrunt/five-units/live/dev/vpc/terragrunt.hcl +3 -0
  201. package/src/__fixtures__/terragrunt/five-units/live/prod/app/terragrunt.hcl +8 -0
  202. package/src/__fixtures__/terragrunt/five-units/live/prod/vpc/terragrunt.hcl +3 -0
  203. package/src/__fixtures__/terragrunt/five-units/modules/thing/main.tf +7 -0
  204. package/src/__fixtures__/terragrunt/five-units/root.hcl +5 -0
  205. package/src/__fixtures__/terragrunt/record.ts +56 -0
  206. package/src/__fixtures__/terragrunt/recorded/affected-find.json +50 -0
  207. package/src/__fixtures__/terragrunt/recorded/failed-plan-report.json +36 -0
  208. package/src/__fixtures__/terragrunt/recorded/find.json +67 -0
  209. package/src/__fixtures__/terragrunt/recorded/version.txt +1 -0
  210. package/src/__fixtures__/terragrunt/recorded/wave-1/apply-report.json +22 -0
  211. package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/dev/vpc/tfplan.json +1 -0
  212. package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/prod/vpc/tfplan.json +1 -0
  213. package/src/__fixtures__/terragrunt/recorded/wave-1/plan-report.json +22 -0
  214. package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/dev/db/tfplan.json +1 -0
  215. package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/prod/app/tfplan.json +1 -0
  216. package/src/__fixtures__/terragrunt/recorded/wave-2/plan-report.json +22 -0
  217. package/src/change-set-combined-run.test.ts +156 -0
  218. package/src/change-set.test.ts +151 -0
  219. package/src/change-set.ts +273 -0
  220. package/src/changed-roots.test.ts +58 -0
  221. package/src/changed-roots.ts +102 -0
  222. package/src/commands.ts +112 -0
  223. package/src/components/capability-plugin.test.ts +91 -0
  224. package/src/components/capability-plugin.ts +131 -0
  225. package/src/components/pr-loop.tofu.test.ts +244 -0
  226. package/src/composites/terraform-pin-rollout-op.test.ts +69 -0
  227. package/src/composites/terraform-pin-rollout-op.ts +60 -0
  228. package/src/hcl/descend.ts +1 -1
  229. package/src/hcl/edges.ts +2 -2
  230. package/src/hcl/jsonencode.test.ts +226 -0
  231. package/src/hcl/jsonencode.ts +454 -0
  232. package/src/hcl/parse.test.ts +25 -0
  233. package/src/hcl/parse.ts +91 -6
  234. package/src/hcl/roots.ts +1 -1
  235. package/src/hcl/suppressions.ts +8 -2
  236. package/src/index.ts +18 -0
  237. package/src/lint/audit-catalog.ts +230 -0
  238. package/src/lint/audit-lineage.ts +155 -1
  239. package/src/lint/audit.test.ts +3 -1
  240. package/src/lint/post-synth/estate-2284.test.ts +68 -0
  241. package/src/lint/post-synth/fixtures/TF030/negative-rules.tf +45 -0
  242. package/src/lint/post-synth/fixtures/TF030/negative.tf +55 -0
  243. package/src/lint/post-synth/fixtures/TF030/not-determined-port.tf +28 -0
  244. package/src/lint/post-synth/fixtures/TF030/not-determined-standalone.tf +32 -0
  245. package/src/lint/post-synth/fixtures/TF030/not-determined-vpc-rule.tf +21 -0
  246. package/src/lint/post-synth/fixtures/TF030/not-determined.tf +39 -0
  247. package/src/lint/post-synth/fixtures/TF030/positive-ipv6.tf +44 -0
  248. package/src/lint/post-synth/fixtures/TF030/positive-mixed.tf +36 -0
  249. package/src/lint/post-synth/fixtures/TF030/positive-standalone.tf +25 -0
  250. package/src/lint/post-synth/fixtures/TF030/positive.tf +43 -0
  251. package/src/lint/post-synth/fixtures/TF031/negative.tf +89 -0
  252. package/src/lint/post-synth/fixtures/TF031/not-determined.tf +139 -0
  253. package/src/lint/post-synth/fixtures/TF031/positive-data-source.tf +57 -0
  254. package/src/lint/post-synth/fixtures/TF031/positive-heredoc.tf +149 -0
  255. package/src/lint/post-synth/fixtures/TF031/positive-jsonencode.tf +115 -0
  256. package/src/lint/post-synth/fixtures/TF032/negative-heredoc.tf +20 -0
  257. package/src/lint/post-synth/fixtures/TF032/negative-references.tf +214 -0
  258. package/src/lint/post-synth/fixtures/TF032/negative.tf +99 -0
  259. package/src/lint/post-synth/fixtures/TF032/positive-heredoc.tf +22 -0
  260. package/src/lint/post-synth/fixtures/TF032/positive-sidecar.tf +197 -0
  261. package/src/lint/post-synth/fixtures/TF032/positive.tf +54 -0
  262. package/src/lint/post-synth/fixtures/TF033/negative.tf +39 -0
  263. package/src/lint/post-synth/fixtures/TF033/not-determined-aurora.tf +25 -0
  264. package/src/lint/post-synth/fixtures/TF033/positive-absent.tf +93 -0
  265. package/src/lint/post-synth/fixtures/TF033/positive.tf +50 -0
  266. package/src/lint/post-synth/fixtures/TF034/negative.tf +24 -0
  267. package/src/lint/post-synth/fixtures/TF034/positive-absent.tf +36 -0
  268. package/src/lint/post-synth/fixtures/TF034/positive.tf +14 -0
  269. package/src/lint/post-synth/fixtures/TF035/negative-absent.tf +43 -0
  270. package/src/lint/post-synth/fixtures/TF035/negative.tf +54 -0
  271. package/src/lint/post-synth/fixtures/TF035/positive.tf +37 -0
  272. package/src/lint/post-synth/fixtures/TF036/negative.tf +61 -0
  273. package/src/lint/post-synth/fixtures/TF036/not-determined.tf +28 -0
  274. package/src/lint/post-synth/fixtures/TF036/positive.tf +38 -0
  275. package/src/lint/post-synth/fixtures/TF037/negative-exclusion.tf +63 -0
  276. package/src/lint/post-synth/fixtures/TF037/negative.tf +27 -0
  277. package/src/lint/post-synth/fixtures/TF037/not-determined.tf +27 -0
  278. package/src/lint/post-synth/fixtures/TF037/positive-absent.tf +15 -0
  279. package/src/lint/post-synth/fixtures/TF037/positive.tf +26 -0
  280. package/src/lint/post-synth/fixtures/TF038/positive.tf +3 -0
  281. package/src/lint/post-synth/fixtures/TF039/positive.tf +4 -0
  282. package/src/lint/post-synth/fixtures/TF041/negative/terragrunt.hcl +12 -0
  283. package/src/lint/post-synth/fixtures/TF041/positive/terragrunt.hcl +7 -0
  284. package/src/lint/post-synth/fixtures/TF041/positive-apply/terragrunt.hcl +8 -0
  285. package/src/lint/post-synth/fixtures/TF042/negative/terragrunt.hcl +13 -0
  286. package/src/lint/post-synth/fixtures/TF042/positive/terragrunt.hcl +9 -0
  287. package/src/lint/post-synth/fixtures/TF043/negative/terragrunt.hcl +3 -0
  288. package/src/lint/post-synth/fixtures/TF043/negative-other/terragrunt.hcl +3 -0
  289. package/src/lint/post-synth/fixtures/TF043/positive-git/terragrunt.hcl +3 -0
  290. package/src/lint/post-synth/fixtures/TF043/positive-oci/terragrunt.hcl +3 -0
  291. package/src/lint/post-synth/fixtures/TF043/positive-tfr/terragrunt.hcl +3 -0
  292. package/src/lint/post-synth/fixtures/TF044/negative/terragrunt.hcl +9 -0
  293. package/src/lint/post-synth/fixtures/TF044/positive/terragrunt.hcl +7 -0
  294. package/src/lint/post-synth/fixtures/TF044/positive-generate/terragrunt.hcl +9 -0
  295. package/src/lint/post-synth/fixtures/TF045/negative/root.hcl +1 -0
  296. package/src/lint/post-synth/fixtures/TF045/negative/terragrunt.hcl +3 -0
  297. package/src/lint/post-synth/fixtures/TF045/positive/root.hcl +9 -0
  298. package/src/lint/post-synth/fixtures/TF045/positive/terragrunt.hcl +3 -0
  299. package/src/lint/post-synth/fixtures/TF045/unit-only/terragrunt.hcl +3 -0
  300. package/src/lint/post-synth/fixtures/estate-2284/clean/main.tf +132 -0
  301. package/src/lint/post-synth/fixtures/estate-2284/violating/main.tf +112 -0
  302. package/src/lint/post-synth/flat-attributes.ts +146 -0
  303. package/src/lint/post-synth/index.ts +32 -0
  304. package/src/lint/post-synth/module-source.test.ts +42 -1
  305. package/src/lint/post-synth/module-source.ts +56 -1
  306. package/src/lint/post-synth/terragrunt.ts +76 -0
  307. package/src/lint/post-synth/tf002.ts +1 -1
  308. package/src/lint/post-synth/tf030.test.ts +219 -0
  309. package/src/lint/post-synth/tf030.ts +290 -0
  310. package/src/lint/post-synth/tf031.test.ts +229 -0
  311. package/src/lint/post-synth/tf031.ts +370 -0
  312. package/src/lint/post-synth/tf032.test.ts +127 -0
  313. package/src/lint/post-synth/tf032.ts +226 -0
  314. package/src/lint/post-synth/tf033.test.ts +126 -0
  315. package/src/lint/post-synth/tf033.ts +160 -0
  316. package/src/lint/post-synth/tf034.test.ts +71 -0
  317. package/src/lint/post-synth/tf034.ts +63 -0
  318. package/src/lint/post-synth/tf035.test.ts +68 -0
  319. package/src/lint/post-synth/tf035.ts +74 -0
  320. package/src/lint/post-synth/tf036.test.ts +87 -0
  321. package/src/lint/post-synth/tf036.ts +119 -0
  322. package/src/lint/post-synth/tf037.test.ts +88 -0
  323. package/src/lint/post-synth/tf037.ts +101 -0
  324. package/src/lint/post-synth/tf038.test.ts +51 -0
  325. package/src/lint/post-synth/tf038.ts +71 -0
  326. package/src/lint/post-synth/tf039.test.ts +40 -0
  327. package/src/lint/post-synth/tf039.ts +64 -0
  328. package/src/lint/post-synth/tf040.test.ts +55 -0
  329. package/src/lint/post-synth/tf040.ts +76 -0
  330. package/src/lint/post-synth/tf041.test.ts +50 -0
  331. package/src/lint/post-synth/tf041.ts +56 -0
  332. package/src/lint/post-synth/tf042.test.ts +19 -0
  333. package/src/lint/post-synth/tf042.ts +42 -0
  334. package/src/lint/post-synth/tf043.test.ts +65 -0
  335. package/src/lint/post-synth/tf043.ts +49 -0
  336. package/src/lint/post-synth/tf044.test.ts +27 -0
  337. package/src/lint/post-synth/tf044.ts +51 -0
  338. package/src/lint/post-synth/tf045.test.ts +30 -0
  339. package/src/lint/post-synth/tf045.ts +47 -0
  340. package/src/op/activities/index.ts +4 -0
  341. package/src/op/activities/pin-rollout.ts +77 -0
  342. package/src/op/activities/terraform.test.ts +13 -0
  343. package/src/op/activities/terraform.ts +46 -86
  344. package/src/op/activity-contracts.test.ts +4 -1
  345. package/src/op/activity-contracts.ts +42 -0
  346. package/src/op/builders.ts +13 -0
  347. package/src/pin/bundle.test.ts +53 -0
  348. package/src/pin/edit-ts.test.ts +39 -0
  349. package/src/pin/edit-ts.ts +77 -0
  350. package/src/pin/edit.test.ts +199 -0
  351. package/src/pin/edit.ts +157 -0
  352. package/src/pin/forge.ts +85 -0
  353. package/src/pin/index.ts +22 -0
  354. package/src/pin/rollout.test.ts +232 -0
  355. package/src/pin/rollout.ts +451 -0
  356. package/src/pin/scan.ts +309 -0
  357. package/src/pin/source.ts +206 -0
  358. package/src/pin/waves.test.ts +101 -0
  359. package/src/pin/waves.ts +125 -0
  360. package/src/plan-digest.ts +99 -0
  361. package/src/plan-summary.test.ts +154 -0
  362. package/src/plugin.ts +25 -2
  363. package/src/terragrunt/affected.acceptance.test.ts +83 -0
  364. package/src/terragrunt/affected.test.ts +177 -0
  365. package/src/terragrunt/affected.ts +348 -0
  366. package/src/terragrunt/index.ts +11 -0
  367. package/src/terragrunt/mocks.acceptance.test.ts +105 -0
  368. package/src/terragrunt/mocks.test.ts +309 -0
  369. package/src/terragrunt/mocks.ts +324 -0
  370. package/src/terragrunt/run.ts +369 -0
  371. package/src/terragrunt/terragrunt.acceptance.test.ts +122 -0
  372. package/src/terragrunt/terragrunt.test.ts +332 -0
  373. package/src/terragrunt/units.ts +235 -0
  374. package/src/terragrunt/wave.ts +181 -0
@@ -0,0 +1,33 @@
1
+ /**
2
+ * TF036: an EBS volume does not ask for encryption (chant #2288, epic #2284).
3
+ *
4
+ * The Terraform counterpart of the aws lexicon's WAW028, written natively.
5
+ *
6
+ * Absence is not determined for this resource. `aws_ebs_volume.encrypted` is
7
+ * optional, computed and force-new (provider `internal/service/ec2/
8
+ * ebs_volume.go`, v6.67.0). Whether a volume created without it is encrypted
9
+ * depends on the Region's EBS encryption by default
10
+ * (https://docs.aws.amazon.com/ebs/latest/userguide/encryption-by-default.html),
11
+ * which is account state the parse cannot see, and a volume built from
12
+ * `snapshot_id` also follows its snapshot. So an unset `encrypted` emits one
13
+ * `info` diagnostic, not a finding.
14
+ *
15
+ * One configuration does settle absence: the volume `depends_on` an
16
+ * `aws_ebs_encryption_by_default` in the same module whose `enabled` is
17
+ * absent (the provider default is `true`) or literal `true`, on the same
18
+ * `provider` and `region`. The `depends_on` matters: without it Terraform may
19
+ * create the volume before it turns the default on, and the default "has no
20
+ * effect on existing EBS volumes".
21
+ *
22
+ * `encrypted = false` is a finding even though encryption by default would
23
+ * override it. The literal is wrong either way: with the default off the
24
+ * volume is unencrypted, and with it on AWS encrypts the volume anyway ("you
25
+ * cannot disable it for individual volumes"), the volume no longer matches
26
+ * the configuration, and because `encrypted` forces replacement Terraform
27
+ * plans to replace it on every apply.
28
+ *
29
+ * Scope: root and child modules alike (#2112).
30
+ */
31
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
32
+ export declare const tf036: PostSynthCheck;
33
+ //# sourceMappingURL=tf036.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf036.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf036.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AA0B9G,eAAO,MAAM,KAAK,EAAE,cA6DnB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * TF037: an ECR repository lets an image tag be repointed (chant #2288, epic
3
+ * #2284).
4
+ *
5
+ * The Terraform counterpart of the aws lexicon's WAW054, written natively.
6
+ *
7
+ * Absence is insecure for this resource, and the rule reports it.
8
+ * `aws_ecr_repository.image_tag_mutability` (provider
9
+ * `internal/service/ecr/repository.go`, v6.67.0) is optional with
10
+ * `Default: MUTABLE`, so a repository that does not set it lets anyone with
11
+ * push access move a tag (`prod`, `v1.4.2`) to different image content after
12
+ * it was deployed, scanned or signed.
13
+ *
14
+ * Provider v6 accepts four values (AWS added the two `_WITH_EXCLUSION` modes
15
+ * in 2025), and the rule reads them as follows:
16
+ *
17
+ * - `IMMUTABLE`: secure.
18
+ * - `IMMUTABLE_WITH_EXCLUSION`: secure. Tags matching an
19
+ * `image_tag_mutability_exclusion_filter` stay mutable, a written-down
20
+ * exception such as `latest`. A filter that is nothing but `*` excludes
21
+ * every tag, so it is a finding; a filter from an expression is not
22
+ * determined.
23
+ * - `MUTABLE`, absent, and `MUTABLE_WITH_EXCLUSION` (every tag mutable except
24
+ * those the filters name): a finding.
25
+ * - an expression: not determined.
26
+ *
27
+ * Scope: root and child modules alike (#2112).
28
+ */
29
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
30
+ export declare const tf037: PostSynthCheck;
31
+ //# sourceMappingURL=tf037.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf037.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf037.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAmC9G,eAAO,MAAM,KAAK,EAAE,cAoCnB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * TF038: an `oci://` module source names no tag and no digest, or a mutable
3
+ * tag.
4
+ *
5
+ * OpenTofu resolves an OCI module source with no `tag` to the `latest` tag
6
+ * (https://opentofu.org/docs/language/modules/sources/), so an unpinned source
7
+ * and `?tag=latest` are the same thing: a push to the registry changes what
8
+ * the root provisions with no diff to review. A digest, or an exact version
9
+ * tag, holds it. `classifyModuleSource` (`./module-source.ts`) reads the tag
10
+ * and digest from either spelling.
11
+ *
12
+ * A warning rather than an error: a registry can make a version tag
13
+ * immutable, and a source that names `?tag=1.4.0` is read as pinned here
14
+ * whether or not the registry enforces that. A digest is the only pin the
15
+ * registry cannot move, which the message says. A source that names a digest
16
+ * is never flagged, whatever tag sits beside it.
17
+ *
18
+ * Scope: root and child modules alike (#2112), same as TF004 and TF005.
19
+ */
20
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
21
+ export declare const tf038: PostSynthCheck;
22
+ //# sourceMappingURL=tf038.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf038.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf038.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAK1C,eAAO,MAAM,KAAK,EAAE,cAyCnB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * TF039: a registry module's `version` is a range, not an exact version.
3
+ *
4
+ * TF004 flags a registry module with no `version`; a `version` of `~> 1.4`,
5
+ * `>= 1.4` or `>= 1.0, < 2.0` passes it, yet an upstream release inside the
6
+ * range changes what the root provisions with no diff to review. This rule is
7
+ * for projects that pin modules to one version (`1.4.0` or `= 1.4.0`).
8
+ *
9
+ * Off by default: it is a `report-only` catalog entry, so the `recommended`
10
+ * preset leaves it out and `lint.presets: { terraform: "all" }` (or a
11
+ * `lint.rules` entry for TF039) turns it on. Ranges are common and often
12
+ * intended, so a default warning would be noise for most roots. It is a
13
+ * separate rule from TF004 because a post-synth check receives no options
14
+ * (`PostSynthCheck.check(ctx)`), while the preset mechanism already carries
15
+ * exactly this on/off choice per rule id (#3190).
16
+ *
17
+ * A module that has no `version` is TF004's finding and is skipped here.
18
+ *
19
+ * Scope: root and child modules alike (#2112).
20
+ */
21
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
22
+ export declare const tf039: PostSynthCheck;
23
+ //# sourceMappingURL=tf039.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf039.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf039.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAK1C,eAAO,MAAM,KAAK,EAAE,cAiCnB,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * TF040: a root that uses providers has no `.terraform.lock.hcl`.
3
+ *
4
+ * The lock file records the provider versions and hashes `terraform init`
5
+ * selected. Without it, each `init` resolves `required_providers` constraints
6
+ * afresh, so a provider release changes a plan with no diff. None of
7
+ * TF001 to TF029 looks at it.
8
+ *
9
+ * "Committed" is decided by presence: the file sits beside the root's `.tf`
10
+ * files in the source tree being parsed (`props.lockFile`, stamped by
11
+ * `parseTerraformRootDir` and by the local audit path). Whether git tracks it
12
+ * is not asked, so a lock file that is present but gitignored counts as
13
+ * committed. A parse with no directory to look in (a fetched repository,
14
+ * inline source) leaves `lockFile` unset and the rule reports nothing: not
15
+ * determined, not clean.
16
+ *
17
+ * A root that implies no provider (no `provider` block and no resource or data
18
+ * type) gets no lock file from `init`, so it is skipped, as is a live
19
+ * choudoufu root, which runs no `init`. One diagnostic per root, anchored on
20
+ * the first block that implies a provider.
21
+ *
22
+ * Off by default in both places: the `report-only` tier keeps it out of a
23
+ * build's `recommended` preset, and `auditOptIn` keeps it out of `chant audit`.
24
+ * Many estates run `init` in CI and never commit the file.
25
+ *
26
+ * Scope: root modules only (#2112); a child module has no lock file of its own.
27
+ */
28
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
29
+ export declare const tf040: PostSynthCheck;
30
+ //# sourceMappingURL=tf040.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf040.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf040.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAM1C,eAAO,MAAM,KAAK,EAAE,cAqCnB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * TF041: a Terragrunt `dependency` has `mock_outputs` and lets them stand in
3
+ * for `apply`.
4
+ *
5
+ * `mock_outputs` is what a dependency returns when it has no outputs yet.
6
+ * `mock_outputs_allowed_terraform_commands` limits which commands may use
7
+ * them. Terragrunt reads a missing list and an empty list the same way, as no
8
+ * limit (`shouldReturnMockOutputs` in `pkg/config/dependency.go`, v1.1.6:
9
+ * `nil || len == 0 || slices.Contains(list, command)`). So a dependency with
10
+ * mocks and no list, or a list that names `apply`, can apply the mock values
11
+ * to real state when the upstream unit has not been applied, and the apply
12
+ * reports success. The usual list is `["validate", "plan"]`.
13
+ *
14
+ * A list that is an expression (`local.mock_commands`) is not determined and
15
+ * passes. A dependency with `enabled = false` returns its mocks whatever the
16
+ * list says; that is a different decision and is not reported here.
17
+ */
18
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
19
+ export declare const tf041: PostSynthCheck;
20
+ //# sourceMappingURL=tf041.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf041.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf041.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAI9G,eAAO,MAAM,KAAK,EAAE,cAiCnB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * TF042: a Terragrunt `dependency` sets `skip_outputs = true` and
3
+ * `mock_outputs`.
4
+ *
5
+ * With `skip_outputs = true` Terragrunt never reads the upstream unit's
6
+ * outputs (`shouldGetOutputs` in `pkg/config/dependency.go`, v1.1.6), so the
7
+ * only values the dependency can return are the mocks. Every plan and apply
8
+ * the mocks are allowed for runs on them, however far the upstream unit has
9
+ * been applied. The pair is sometimes meant, to break a cycle or to avoid
10
+ * reading state, and then the mock values are the configuration; that is
11
+ * worth writing as inputs, which a reader of the unit can see.
12
+ *
13
+ * Only a literal `skip_outputs = true` is reported. A `skip_outputs` built
14
+ * from an expression is not determined.
15
+ */
16
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
17
+ export declare const tf042: PostSynthCheck;
18
+ //# sourceMappingURL=tf042.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf042.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf042.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAI9G,eAAO,MAAM,KAAK,EAAE,cAqBnB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * TF043: a Terragrunt unit's `terraform.source` names no version.
3
+ *
4
+ * A git source with no `?ref=` follows the default branch, a `tfr://` source
5
+ * with no `?version=` follows the registry's latest release, and an `oci://`
6
+ * source with no tag or digest pulls `latest`. A push or a release changes
7
+ * what the unit provisions with no diff to review. TF005 and TF038 do the same
8
+ * for `module` blocks; a Terragrunt unit has no `module` block, its source is
9
+ * the `source` argument of the `terraform` block.
10
+ *
11
+ * A local path and a source built from an expression (`${local.base}//x`) are
12
+ * not determined and pass. A mutable `?ref=main` is not judged
13
+ * here: the rule asks only whether a version is named.
14
+ */
15
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
16
+ export declare const tf043: PostSynthCheck;
17
+ //# sourceMappingURL=tf043.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf043.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf043.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAU9G,eAAO,MAAM,KAAK,EAAE,cAuBnB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * TF044: a Terragrunt config keeps state in a local backend.
3
+ *
4
+ * Read from `remote_state { backend = "local" }` and from a `generate` block
5
+ * whose `contents` declare `backend "local"`. State on the runner's disk is
6
+ * gone when the job ends, a second job cannot read what the first applied, and
7
+ * a git-range run, which checks out each side in a temporary directory, never
8
+ * sees state at all. A shared backend (S3, GCS, azurerm, a Terraform HTTP
9
+ * backend) holds it.
10
+ *
11
+ * A backend named by an expression is not determined and passes. A local
12
+ * backend is sometimes right for a throwaway sandbox; suppress the rule there
13
+ * with `# chant-ignore TF044`.
14
+ */
15
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
16
+ export declare const tf044: PostSynthCheck;
17
+ //# sourceMappingURL=tf044.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf044.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf044.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAM9G,eAAO,MAAM,KAAK,EAAE,cA6BnB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * TF045: no Terragrunt config sets `terragrunt_version_constraint`.
3
+ *
4
+ * The attribute makes Terragrunt refuse to run on a release outside the range.
5
+ * Without it each machine and each CI image runs whatever Terragrunt it
6
+ * installed, and a behaviour change between releases reaches a plan with no
7
+ * diff. It is usually set once, in the root config every unit includes.
8
+ *
9
+ * The rule looks at the whole set of configs in the scan and reports once. It
10
+ * reports only when the set holds a config that includes no other file (the
11
+ * root config, or a self-contained unit) and none of the configs sets the
12
+ * attribute. A set made only of units that include a parent it did not read,
13
+ * such as one unit directory passed alone, is not determined: the parent may
14
+ * set it. The finding is anchored on `root.hcl` when the set has one.
15
+ *
16
+ * Off by default: the `report-only` tier keeps it out of the `recommended`
17
+ * preset, since many repos pin Terragrunt in the toolchain (`.tool-versions`,
18
+ * a CI image) rather than in config.
19
+ */
20
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
21
+ export declare const tf045: PostSynthCheck;
22
+ //# sourceMappingURL=tf045.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tf045.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tf045.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAI9G,eAAO,MAAM,KAAK,EAAE,cAsBnB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terraform",
3
- "version": "0.101.0",
3
+ "version": "0.104.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Terraform"
6
6
  }
package/dist/okf/index.md CHANGED
@@ -32,4 +32,20 @@ okf_version: '0.2'
32
32
  * [TF027](/rules/TF027.md) - Live root's policy block sets undeclared_untagged = "delete", which deletes resources chant does not own
33
33
  * [TF028](/rules/TF028.md) - A live root is watched by a TerraformWatchOp built without live: true
34
34
  * [TF029](/rules/TF029.md) - Live root names its estate both in chant.config and in its own HCL
35
+ * [TF030](/rules/TF030.md) - Security group rule allows unrestricted ingress on a sensitive port
36
+ * [TF031](/rules/TF031.md) - IAM policy allows a wildcard Action or Resource
37
+ * [TF032](/rules/TF032.md) - ECS container definition passes a credential as a plaintext environment value
38
+ * [TF033](/rules/TF033.md) - RDS DB instance or cluster storage is not encrypted
39
+ * [TF034](/rules/TF034.md) - SNS topic has no server-side encryption
40
+ * [TF035](/rules/TF035.md) - SQS queue turns server-side encryption off
41
+ * [TF036](/rules/TF036.md) - EBS volume does not ask for encryption
42
+ * [TF037](/rules/TF037.md) - ECR repository allows mutable image tags
43
+ * [TF038](/rules/TF038.md) - OCI module source has no tag or digest, or a mutable tag
44
+ * [TF039](/rules/TF039.md) - Registry module version is a range, not an exact version
45
+ * [TF040](/rules/TF040.md) - Root has no committed .terraform.lock.hcl
46
+ * [TF041](/rules/TF041.md) - Terragrunt dependency lets mock_outputs stand in for apply
47
+ * [TF042](/rules/TF042.md) - Terragrunt dependency sets skip_outputs together with mock_outputs
48
+ * [TF043](/rules/TF043.md) - Terragrunt terraform.source names no version (git ref, tfr version or oci tag)
49
+ * [TF044](/rules/TF044.md) - Terragrunt config keeps state in a local backend
50
+ * [TF045](/rules/TF045.md) - No Terragrunt config sets terragrunt_version_constraint
35
51
  * [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: TF030
4
+ description: Security group rule allows unrestricted ingress on a sensitive port
5
+ id: TF030
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ Security group rule allows unrestricted ingress on a sensitive port
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF031
4
+ description: IAM policy allows a wildcard Action or Resource
5
+ id: TF031
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ IAM policy allows a wildcard Action or Resource
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF032
4
+ description: ECS container definition passes a credential as a plaintext environment value
5
+ id: TF032
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ ECS container definition passes a credential as a plaintext environment value
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF033
4
+ description: RDS DB instance or cluster storage is not encrypted
5
+ id: TF033
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ RDS DB instance or cluster storage is not encrypted
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF034
4
+ description: SNS topic has no server-side encryption
5
+ id: TF034
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ SNS topic has no server-side encryption
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF035
4
+ description: SQS queue turns server-side encryption off
5
+ id: TF035
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ SQS queue turns server-side encryption off
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF036
4
+ description: EBS volume does not ask for encryption
5
+ id: TF036
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ EBS volume does not ask for encryption
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF037
4
+ description: ECR repository allows mutable image tags
5
+ id: TF037
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ ECR repository allows mutable image tags
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF038
4
+ description: OCI module source has no tag or digest, or a mutable tag
5
+ id: TF038
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ OCI module source has no tag or digest, or a mutable tag
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF039
4
+ description: Registry module version is a range, not an exact version
5
+ id: TF039
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ Registry module version is a range, not an exact version
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF040
4
+ description: Root has no committed .terraform.lock.hcl
5
+ id: TF040
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ Root has no committed .terraform.lock.hcl
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF041
4
+ description: Terragrunt dependency lets mock_outputs stand in for apply
5
+ id: TF041
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ Terragrunt dependency lets mock_outputs stand in for apply
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF042
4
+ description: Terragrunt dependency sets skip_outputs together with mock_outputs
5
+ id: TF042
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ Terragrunt dependency sets skip_outputs together with mock_outputs
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF043
4
+ description: Terragrunt terraform.source names no version (git ref, tfr version or oci tag)
5
+ id: TF043
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ Terragrunt terraform.source names no version (git ref, tfr version or oci tag)
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF044
4
+ description: Terragrunt config keeps state in a local backend
5
+ id: TF044
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ Terragrunt config keeps state in a local backend
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: TF045
4
+ description: No Terragrunt config sets terragrunt_version_constraint
5
+ id: TF045
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: terraform
9
+ docs: https://intentius.io/chant/lexicons/terraform/rules/
10
+ ---
11
+ No Terragrunt config sets terragrunt_version_constraint
@@ -16,6 +16,8 @@
16
16
  * - choudoufuLiveLs: `live-ls -estate=<estate> -json [-consistent]` (#2103).
17
17
  * - choudoufuLiveCheck: `live-check -json`, no cloud calls (#2103).
18
18
  * - choudoufuAdopt: the tag writes that claim an adoption ledger's matches (#2105).
19
+ * - terraformPinRollout: one run of a pin-bump rollout, opening at most one
20
+ * wave's pull request (#3189). It loads the HCL parser on first call.
19
21
  *
20
22
  * The module is dependency-light on purpose: it shells out to the configured
21
23
  * binary and reads the `terraform` config namespace, and never touches the
@@ -26,4 +28,6 @@
26
28
  export { terraformInit, terraformPlan, terraformApply, terraformShow, choudoufuLivePlan, choudoufuLiveLs, choudoufuLiveCheck, choudoufuAdopt, terraformInitCommand, terraformPlanCommand, terraformApplyCommand, terraformShowCommand, choudoufuLivePlanCommand, choudoufuLiveLsCommand, choudoufuLiveCheckCommand, terraformEnvironment, terraformBinary, countPlanChanges, countLivePlanUnowned, isOlderVersion, parseChoudoufuVersion, quoteArg, DEFAULT_PLAN_FILE, DEFAULT_TERRAFORM_BINARY, DEFAULT_LIVE_PLAN_DOCUMENT_FILE, MIN_CHOUDOUFU_VERSION, classifyApprovalRefusal, CHOUDOUFU_LIVE_PLAN_OUT_REFUSAL, CHOUDOUFU_APPROVAL_EXIT_CODE, CHOUDOUFU_APPROVAL_MISMATCH_REFUSAL, CHOUDOUFU_WRONG_ESTATE_REFUSAL, } from "./terraform.js";
27
29
  export type { TerraformRootArgs, TerraformInitArgs, TerraformPlanArgs, TerraformApplyArgs, TerraformShowArgs, ChoudoufuLivePlanArgs, ChoudoufuLiveLsArgs, ChoudoufuLiveCheckArgs, ChoudoufuAdoptArgs, TerraformInitResult, TerraformPlanResult, TerraformApplyResult, TerraformApprovalRefusal, TerraformShowResult, ChoudoufuLivePlanResult, ChoudoufuLiveLsResult, ChoudoufuLiveCheckResult, ChoudoufuAdoptResult, AdoptionRefusal, PlanChangeCounts, LivePlanUnownedCounts, } from "./terraform.js";
28
30
  export { detectLiveEstate } from "./live-detect.js";
31
+ export { terraformPinRollout } from "./pin-rollout.js";
32
+ export type { TerraformPinRolloutArgs, TerraformPinRolloutResult } from "./pin-rollout.js";
29
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,iBAAiB,EACjB,wBAAwB,EACxB,+BAA+B,EAC/B,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,4BAA4B,EAC5B,mCAAmC,EACnC,8BAA8B,GAC/B,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,iBAAiB,EACjB,wBAAwB,EACxB,+BAA+B,EAC/B,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,4BAA4B,EAC5B,mCAAmC,EACnC,8BAA8B,GAC/B,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * `terraformPinRollout`: one run of a pin-bump rollout (#3189), as an Op
3
+ * activity. `chant terraform pin-rollout` calls the same function.
4
+ *
5
+ * Each run reads where the rollout stands on the forge and opens at most one
6
+ * wave's pull request (`../../pin/rollout.ts`). Run it again, by hand or on
7
+ * an Op `schedule`, to move on once a wave's PR has merged and its roots have
8
+ * applied. A run that finds a failed root or a PR closed without merging
9
+ * throws, naming it, so the run fails rather than reporting success.
10
+ *
11
+ * The HCL parser, the pin code and the TypeScript editor load on first call,
12
+ * so importing the activities loads none of them.
13
+ */
14
+ import type { PinRoot, PinRolloutMode, PinRolloutResult } from "../../pin/index.js";
15
+ export interface TerraformPinRolloutArgs {
16
+ /** The module, as its `source` names it without the pin: `oci://registry.example.com/modules/vpc`. */
17
+ module: string;
18
+ /** The pin the roots are at now. */
19
+ from: string;
20
+ /** The pin to move them to: an exact version, tag, ref or `sha256:` digest. */
21
+ to: string;
22
+ /** The roots, by directory relative to the repository. Default: every root that calls the module. */
23
+ roots?: PinRoot[];
24
+ /** Roots that form wave 1. */
25
+ canaries?: string[];
26
+ /** A `choudoufu live-waves -json` document to take the waves from, instead of canaries and dependency order. */
27
+ wavesFrom?: string;
28
+ /** The directory choudoufu ran in, relative to the repository, when its roots are relative to that. */
29
+ wavesPrefix?: string;
30
+ /** `report` (default) or `pull-request`. */
31
+ mode?: PinRolloutMode;
32
+ /** The branch PRs target. Default: the remote's default branch. */
33
+ base?: string;
34
+ /** Default `origin`. */
35
+ remote?: string;
36
+ /** The apply check each root reports on the merge commit, with `{root}` for its directory. Default `apply/{root}`. */
37
+ appliedCheck?: string;
38
+ /** A directory in the repository. Default: the working directory. */
39
+ cwd?: string;
40
+ }
41
+ export type TerraformPinRolloutResult = PinRolloutResult;
42
+ /** Run one step of a pin-bump rollout. Throws when the rollout has stopped. */
43
+ export declare function terraformPinRollout(args: TerraformPinRolloutArgs): Promise<TerraformPinRolloutResult>;
44
+ /** The same run, returning a stopped rollout instead of throwing. `chant terraform pin-rollout` calls this. */
45
+ export declare function readPinRollout(args: TerraformPinRolloutArgs): Promise<TerraformPinRolloutResult>;
46
+ //# sourceMappingURL=pin-rollout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin-rollout.d.ts","sourceRoot":"","sources":["../../../src/op/activities/pin-rollout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE3E,MAAM,WAAW,uBAAuB;IACtC,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,qGAAqG;IACrG,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,gHAAgH;IAChH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uGAAuG;IACvG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sHAAsH;IACtH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,CAAC;AAEzD,+EAA+E;AAC/E,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAI3G;AAED,+GAA+G;AAC/G,wBAAsB,cAAc,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAqBtG"}