@intentius/chant-lexicon-terraform 0.57.0 → 0.59.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 (408) hide show
  1. package/README.md +9 -0
  2. package/dist/composites/terraform-adopt-op.d.ts +131 -0
  3. package/dist/composites/terraform-adopt-op.d.ts.map +1 -0
  4. package/dist/composites/terraform-apply-op.d.ts +70 -17
  5. package/dist/composites/terraform-apply-op.d.ts.map +1 -1
  6. package/dist/composites/terraform-watch-op.d.ts +104 -37
  7. package/dist/composites/terraform-watch-op.d.ts.map +1 -1
  8. package/dist/config.d.ts +49 -2
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/describe-resources.d.ts +256 -16
  11. package/dist/describe-resources.d.ts.map +1 -1
  12. package/dist/hcl/descend.d.ts +98 -0
  13. package/dist/hcl/descend.d.ts.map +1 -0
  14. package/dist/hcl/marker.d.ts +130 -0
  15. package/dist/hcl/marker.d.ts.map +1 -0
  16. package/dist/hcl/parse.d.ts +156 -9
  17. package/dist/hcl/parse.d.ts.map +1 -1
  18. package/dist/hcl/references.d.ts +76 -0
  19. package/dist/hcl/references.d.ts.map +1 -0
  20. package/dist/hcl/roots.d.ts +22 -3
  21. package/dist/hcl/roots.d.ts.map +1 -1
  22. package/dist/hcl/suppressions.d.ts +54 -0
  23. package/dist/hcl/suppressions.d.ts.map +1 -0
  24. package/dist/hcl/value.d.ts +77 -0
  25. package/dist/hcl/value.d.ts.map +1 -0
  26. package/dist/index.d.ts +5 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/integrity.json +34 -5
  29. package/dist/lint/audit-catalog.d.ts +3 -2
  30. package/dist/lint/audit-catalog.d.ts.map +1 -1
  31. package/dist/lint/audit-lineage.d.ts +95 -0
  32. package/dist/lint/audit-lineage.d.ts.map +1 -1
  33. package/dist/lint/post-synth/blocks.d.ts +53 -0
  34. package/dist/lint/post-synth/blocks.d.ts.map +1 -0
  35. package/dist/lint/post-synth/fixtures/load.d.ts +37 -0
  36. package/dist/lint/post-synth/fixtures/load.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 +38 -0
  39. package/dist/lint/post-synth/module-source.d.ts.map +1 -0
  40. package/dist/lint/post-synth/scope.d.ts +65 -0
  41. package/dist/lint/post-synth/scope.d.ts.map +1 -0
  42. package/dist/lint/post-synth/tf001.d.ts +58 -6
  43. package/dist/lint/post-synth/tf001.d.ts.map +1 -1
  44. package/dist/lint/post-synth/tf002.d.ts +32 -0
  45. package/dist/lint/post-synth/tf002.d.ts.map +1 -0
  46. package/dist/lint/post-synth/tf003.d.ts +22 -0
  47. package/dist/lint/post-synth/tf003.d.ts.map +1 -0
  48. package/dist/lint/post-synth/tf004.d.ts +22 -0
  49. package/dist/lint/post-synth/tf004.d.ts.map +1 -0
  50. package/dist/lint/post-synth/tf005.d.ts +28 -0
  51. package/dist/lint/post-synth/tf005.d.ts.map +1 -0
  52. package/dist/lint/post-synth/tf006.d.ts +21 -0
  53. package/dist/lint/post-synth/tf006.d.ts.map +1 -0
  54. package/dist/lint/post-synth/tf007.d.ts +21 -0
  55. package/dist/lint/post-synth/tf007.d.ts.map +1 -0
  56. package/dist/lint/post-synth/tf008.d.ts +22 -0
  57. package/dist/lint/post-synth/tf008.d.ts.map +1 -0
  58. package/dist/lint/post-synth/tf009.d.ts +24 -0
  59. package/dist/lint/post-synth/tf009.d.ts.map +1 -0
  60. package/dist/lint/post-synth/tf010.d.ts +19 -0
  61. package/dist/lint/post-synth/tf010.d.ts.map +1 -0
  62. package/dist/lint/post-synth/tf011.d.ts +18 -0
  63. package/dist/lint/post-synth/tf011.d.ts.map +1 -0
  64. package/dist/lint/post-synth/tf012.d.ts +17 -0
  65. package/dist/lint/post-synth/tf012.d.ts.map +1 -0
  66. package/dist/lint/post-synth/tf013.d.ts +21 -0
  67. package/dist/lint/post-synth/tf013.d.ts.map +1 -0
  68. package/dist/lint/post-synth/tf014.d.ts +25 -0
  69. package/dist/lint/post-synth/tf014.d.ts.map +1 -0
  70. package/dist/lint/post-synth/tf015.d.ts +30 -0
  71. package/dist/lint/post-synth/tf015.d.ts.map +1 -0
  72. package/dist/lint/post-synth/tf016.d.ts +30 -0
  73. package/dist/lint/post-synth/tf016.d.ts.map +1 -0
  74. package/dist/lint/post-synth/tf017.d.ts +19 -0
  75. package/dist/lint/post-synth/tf017.d.ts.map +1 -0
  76. package/dist/lint/post-synth/tf018.d.ts +20 -0
  77. package/dist/lint/post-synth/tf018.d.ts.map +1 -0
  78. package/dist/lint/post-synth/tf019.d.ts +25 -0
  79. package/dist/lint/post-synth/tf019.d.ts.map +1 -0
  80. package/dist/lint/post-synth/tf020.d.ts +38 -0
  81. package/dist/lint/post-synth/tf020.d.ts.map +1 -0
  82. package/dist/lint/post-synth/tf021.d.ts +41 -0
  83. package/dist/lint/post-synth/tf021.d.ts.map +1 -0
  84. package/dist/lint/post-synth/tf022.d.ts +24 -0
  85. package/dist/lint/post-synth/tf022.d.ts.map +1 -0
  86. package/dist/lint/post-synth/tf024.d.ts +24 -0
  87. package/dist/lint/post-synth/tf024.d.ts.map +1 -0
  88. package/dist/lint/post-synth/tf025.d.ts +29 -0
  89. package/dist/lint/post-synth/tf025.d.ts.map +1 -0
  90. package/dist/lint/post-synth/tf026.d.ts +28 -0
  91. package/dist/lint/post-synth/tf026.d.ts.map +1 -0
  92. package/dist/lint/post-synth/tf027.d.ts +30 -0
  93. package/dist/lint/post-synth/tf027.d.ts.map +1 -0
  94. package/dist/lint/post-synth/tf028.d.ts +33 -0
  95. package/dist/lint/post-synth/tf028.d.ts.map +1 -0
  96. package/dist/lint/rules/fixtures/load.d.ts +13 -0
  97. package/dist/lint/rules/fixtures/load.d.ts.map +1 -0
  98. package/dist/lint/rules/plan-before-apply.d.ts +11 -0
  99. package/dist/lint/rules/plan-before-apply.d.ts.map +1 -1
  100. package/dist/lint/secret-shape.d.ts +68 -0
  101. package/dist/lint/secret-shape.d.ts.map +1 -0
  102. package/dist/live-ownership.d.ts +55 -0
  103. package/dist/live-ownership.d.ts.map +1 -0
  104. package/dist/lsp/option-keys.d.ts.map +1 -1
  105. package/dist/manifest.json +1 -1
  106. package/dist/okf/index.md +26 -0
  107. package/dist/okf/rules/TF002.md +11 -0
  108. package/dist/okf/rules/TF003.md +11 -0
  109. package/dist/okf/rules/TF004.md +11 -0
  110. package/dist/okf/rules/TF005.md +11 -0
  111. package/dist/okf/rules/TF006.md +11 -0
  112. package/dist/okf/rules/TF007.md +11 -0
  113. package/dist/okf/rules/TF008.md +11 -0
  114. package/dist/okf/rules/TF009.md +11 -0
  115. package/dist/okf/rules/TF010.md +11 -0
  116. package/dist/okf/rules/TF011.md +11 -0
  117. package/dist/okf/rules/TF012.md +11 -0
  118. package/dist/okf/rules/TF013.md +11 -0
  119. package/dist/okf/rules/TF014.md +11 -0
  120. package/dist/okf/rules/TF015.md +11 -0
  121. package/dist/okf/rules/TF016.md +11 -0
  122. package/dist/okf/rules/TF017.md +11 -0
  123. package/dist/okf/rules/TF018.md +11 -0
  124. package/dist/okf/rules/TF019.md +11 -0
  125. package/dist/okf/rules/TF020.md +11 -0
  126. package/dist/okf/rules/TF021.md +11 -0
  127. package/dist/okf/rules/TF022.md +11 -0
  128. package/dist/okf/rules/TF024.md +11 -0
  129. package/dist/okf/rules/TF025.md +11 -0
  130. package/dist/okf/rules/TF026.md +11 -0
  131. package/dist/okf/rules/TF027.md +11 -0
  132. package/dist/okf/rules/TF028.md +11 -0
  133. package/dist/op/activities/index.d.ts +13 -6
  134. package/dist/op/activities/index.d.ts.map +1 -1
  135. package/dist/op/activities/live-detect.d.ts +51 -0
  136. package/dist/op/activities/live-detect.d.ts.map +1 -0
  137. package/dist/op/activities/terraform.d.ts +466 -17
  138. package/dist/op/activities/terraform.d.ts.map +1 -1
  139. package/dist/op/activity-contracts.d.ts +148 -0
  140. package/dist/op/activity-contracts.d.ts.map +1 -0
  141. package/dist/op/adoption.d.ts +118 -0
  142. package/dist/op/adoption.d.ts.map +1 -0
  143. package/dist/op/builders.d.ts +48 -6
  144. package/dist/op/builders.d.ts.map +1 -1
  145. package/dist/op/resolve-root-mode.d.ts +59 -0
  146. package/dist/op/resolve-root-mode.d.ts.map +1 -0
  147. package/dist/plugin.d.ts.map +1 -1
  148. package/dist/rules/blocks.ts +109 -0
  149. package/dist/rules/module-source.ts +121 -0
  150. package/dist/rules/plan-before-apply.ts +11 -0
  151. package/dist/rules/scope.ts +107 -0
  152. package/dist/rules/tf001.ts +98 -18
  153. package/dist/rules/tf002.ts +151 -0
  154. package/dist/rules/tf003.ts +71 -0
  155. package/dist/rules/tf004.ts +63 -0
  156. package/dist/rules/tf005.ts +76 -0
  157. package/dist/rules/tf006.ts +53 -0
  158. package/dist/rules/tf007.ts +78 -0
  159. package/dist/rules/tf008.ts +75 -0
  160. package/dist/rules/tf009.ts +59 -0
  161. package/dist/rules/tf010.ts +51 -0
  162. package/dist/rules/tf011.ts +49 -0
  163. package/dist/rules/tf012.ts +47 -0
  164. package/dist/rules/tf013.ts +63 -0
  165. package/dist/rules/tf014.ts +72 -0
  166. package/dist/rules/tf015.ts +72 -0
  167. package/dist/rules/tf016.ts +75 -0
  168. package/dist/rules/tf017.ts +50 -0
  169. package/dist/rules/tf018.ts +72 -0
  170. package/dist/rules/tf019.ts +72 -0
  171. package/dist/rules/tf020.ts +123 -0
  172. package/dist/rules/tf021.ts +126 -0
  173. package/dist/rules/tf022.ts +61 -0
  174. package/dist/rules/tf024.ts +70 -0
  175. package/dist/rules/tf025.ts +101 -0
  176. package/dist/rules/tf026.ts +84 -0
  177. package/dist/rules/tf027.ts +74 -0
  178. package/dist/rules/tf028.ts +96 -0
  179. package/dist/skills/chant-terraform.md +1 -1
  180. package/dist/validate.d.ts.map +1 -1
  181. package/package.json +7 -2
  182. package/src/__fixtures__/ACCEPTANCE.md +181 -0
  183. package/src/__fixtures__/live/main.tf +28 -0
  184. package/src/__fixtures__/live-adopt/estate.chdf.hcl +6 -0
  185. package/src/__fixtures__/live-adopt/main.tf +21 -0
  186. package/src/__fixtures__/live-estate/README.md +58 -0
  187. package/src/__fixtures__/live-estate/compute.tf +10 -0
  188. package/src/__fixtures__/live-estate/estate.chdf.hcl +1 -0
  189. package/src/__fixtures__/live-estate/logs.tf +8 -0
  190. package/src/__fixtures__/live-estate/network.tf +24 -0
  191. package/src/__fixtures__/live-estate/rule.tf +11 -0
  192. package/src/__fixtures__/live-estate/unowned.tf +21 -0
  193. package/src/__fixtures__/live-estate/versions.tf +31 -0
  194. package/src/__fixtures__/live-ls.json +98 -0
  195. package/src/__fixtures__/live-plan.json +285 -0
  196. package/src/__fixtures__/live-sidecar/estate.chdf.hcl +3 -0
  197. package/src/__fixtures__/live-sidecar/main.tf +24 -0
  198. package/src/__fixtures__/module-tree/README.md +16 -0
  199. package/src/__fixtures__/module-tree/cycle/main.tf +3 -0
  200. package/src/__fixtures__/module-tree/cycle/modules/a/main.tf +9 -0
  201. package/src/__fixtures__/module-tree/cycle/modules/b/main.tf +9 -0
  202. package/src/__fixtures__/module-tree/missing/main.tf +9 -0
  203. package/src/__fixtures__/module-tree/outside/root/main.tf +9 -0
  204. package/src/__fixtures__/module-tree/root/main.tf +28 -0
  205. package/src/__fixtures__/module-tree/root/modules/cdn/main.tf +15 -0
  206. package/src/__fixtures__/module-tree/root/modules/cdn/modules/bucket/main.tf +11 -0
  207. package/src/__fixtures__/module-tree/shared/main.tf +5 -0
  208. package/src/__fixtures__/references/main.tf +56 -0
  209. package/src/__fixtures__/remote-backend/main.tf +34 -0
  210. package/src/__fixtures__/with-backend/main.tf +7 -0
  211. package/src/codegen/lint-rules-page.test.ts +45 -0
  212. package/src/composites/terraform-adopt-op.acceptance.test.ts +193 -0
  213. package/src/composites/terraform-adopt-op.test.ts +175 -0
  214. package/src/composites/terraform-adopt-op.ts +202 -0
  215. package/src/composites/terraform-apply-op.acceptance.test.ts +188 -5
  216. package/src/composites/terraform-apply-op.test.ts +179 -19
  217. package/src/composites/terraform-apply-op.ts +123 -30
  218. package/src/composites/terraform-watch-op.test.ts +169 -29
  219. package/src/composites/terraform-watch-op.ts +183 -75
  220. package/src/config.ts +32 -3
  221. package/src/describe-resources.live.test.ts +598 -0
  222. package/src/describe-resources.test.ts +53 -0
  223. package/src/describe-resources.ts +811 -28
  224. package/src/hcl/descend.test.ts +162 -0
  225. package/src/hcl/descend.ts +273 -0
  226. package/src/hcl/marker.test.ts +147 -0
  227. package/src/hcl/marker.ts +235 -0
  228. package/src/hcl/parse.test.ts +69 -0
  229. package/src/hcl/parse.ts +269 -27
  230. package/src/hcl/references.test.ts +116 -0
  231. package/src/hcl/references.ts +172 -0
  232. package/src/hcl/roots.ts +59 -5
  233. package/src/hcl/suppressions.test.ts +147 -0
  234. package/src/hcl/suppressions.ts +204 -0
  235. package/src/hcl/value.test.ts +73 -0
  236. package/src/hcl/value.ts +106 -0
  237. package/src/index.ts +31 -1
  238. package/src/lint/audit-catalog.ts +288 -3
  239. package/src/lint/audit-lineage.ts +384 -1
  240. package/src/lint/audit.test.ts +210 -3
  241. package/src/lint/post-synth/blocks.ts +109 -0
  242. package/src/lint/post-synth/fixtures/TF001/negative-cloud.tf +28 -0
  243. package/src/lint/post-synth/fixtures/TF001/negative.tf +30 -0
  244. package/src/lint/post-synth/fixtures/TF001/positive-local.tf +31 -0
  245. package/src/lint/post-synth/fixtures/TF001/positive.tf +24 -0
  246. package/src/lint/post-synth/fixtures/TF002/negative.tf +17 -0
  247. package/src/lint/post-synth/fixtures/TF002/positive-legacy.tf +10 -0
  248. package/src/lint/post-synth/fixtures/TF002/positive-no-version.tf +12 -0
  249. package/src/lint/post-synth/fixtures/TF002/positive.tf +7 -0
  250. package/src/lint/post-synth/fixtures/TF003/negative.tf +10 -0
  251. package/src/lint/post-synth/fixtures/TF003/positive.tf +8 -0
  252. package/src/lint/post-synth/fixtures/TF004/negative-git.tf +3 -0
  253. package/src/lint/post-synth/fixtures/TF004/negative-local.tf +3 -0
  254. package/src/lint/post-synth/fixtures/TF004/negative.tf +4 -0
  255. package/src/lint/post-synth/fixtures/TF004/positive.tf +3 -0
  256. package/src/lint/post-synth/fixtures/TF005/negative-local.tf +3 -0
  257. package/src/lint/post-synth/fixtures/TF005/negative-registry.tf +3 -0
  258. package/src/lint/post-synth/fixtures/TF005/negative-sha.tf +3 -0
  259. package/src/lint/post-synth/fixtures/TF005/negative.tf +3 -0
  260. package/src/lint/post-synth/fixtures/TF005/positive-branch.tf +3 -0
  261. package/src/lint/post-synth/fixtures/TF005/positive-non-semver.tf +3 -0
  262. package/src/lint/post-synth/fixtures/TF005/positive.tf +3 -0
  263. package/src/lint/post-synth/fixtures/TF006/negative.tf +5 -0
  264. package/src/lint/post-synth/fixtures/TF006/positive-empty-default.tf +11 -0
  265. package/src/lint/post-synth/fixtures/TF006/positive.tf +6 -0
  266. package/src/lint/post-synth/fixtures/TF007/negative.tf +10 -0
  267. package/src/lint/post-synth/fixtures/TF007/positive.tf +9 -0
  268. package/src/lint/post-synth/fixtures/TF008/negative-variable.tf +10 -0
  269. package/src/lint/post-synth/fixtures/TF008/negative.tf +8 -0
  270. package/src/lint/post-synth/fixtures/TF008/positive-other-provider.tf +10 -0
  271. package/src/lint/post-synth/fixtures/TF008/positive.tf +5 -0
  272. package/src/lint/post-synth/fixtures/TF009/negative.tf +10 -0
  273. package/src/lint/post-synth/fixtures/TF009/positive.tf +4 -0
  274. package/src/lint/post-synth/fixtures/TF010/negative.tf +5 -0
  275. package/src/lint/post-synth/fixtures/TF010/positive.tf +4 -0
  276. package/src/lint/post-synth/fixtures/TF011/negative.tf +5 -0
  277. package/src/lint/post-synth/fixtures/TF011/positive-blank.tf +5 -0
  278. package/src/lint/post-synth/fixtures/TF011/positive.tf +4 -0
  279. package/src/lint/post-synth/fixtures/TF012/negative.tf +4 -0
  280. package/src/lint/post-synth/fixtures/TF012/positive.tf +3 -0
  281. package/src/lint/post-synth/fixtures/TF013/negative.tf +8 -0
  282. package/src/lint/post-synth/fixtures/TF013/positive-data.tf +8 -0
  283. package/src/lint/post-synth/fixtures/TF013/positive.tf +8 -0
  284. package/src/lint/post-synth/fixtures/TF014/negative/main.tf +26 -0
  285. package/src/lint/post-synth/fixtures/TF014/negative/modules/cdn/main.tf +19 -0
  286. package/src/lint/post-synth/fixtures/TF014/positive/main.tf +16 -0
  287. package/src/lint/post-synth/fixtures/TF014/positive/modules/cdn/main.tf +15 -0
  288. package/src/lint/post-synth/fixtures/TF015/negative/main.tf +13 -0
  289. package/src/lint/post-synth/fixtures/TF015/negative/modules/cdn/main.tf +16 -0
  290. package/src/lint/post-synth/fixtures/TF015/positive/main.tf +13 -0
  291. package/src/lint/post-synth/fixtures/TF015/positive/modules/cdn/main.tf +14 -0
  292. package/src/lint/post-synth/fixtures/TF016/negative-template.tf +7 -0
  293. package/src/lint/post-synth/fixtures/TF016/negative.tf +16 -0
  294. package/src/lint/post-synth/fixtures/TF016/positive-shared-file.tf +12 -0
  295. package/src/lint/post-synth/fixtures/TF016/positive.tf +13 -0
  296. package/src/lint/post-synth/fixtures/TF017/negative.tf +4 -0
  297. package/src/lint/post-synth/fixtures/TF017/positive.tf +5 -0
  298. package/src/lint/post-synth/fixtures/TF018/negative.tf +9 -0
  299. package/src/lint/post-synth/fixtures/TF018/positive-data.tf +9 -0
  300. package/src/lint/post-synth/fixtures/TF018/positive.tf +4 -0
  301. package/src/lint/post-synth/fixtures/TF019/negative.tf +14 -0
  302. package/src/lint/post-synth/fixtures/TF019/positive-output.tf +5 -0
  303. package/src/lint/post-synth/fixtures/TF019/positive.tf +16 -0
  304. package/src/lint/post-synth/fixtures/TF020/negative.tf +43 -0
  305. package/src/lint/post-synth/fixtures/TF020/positive.tf +32 -0
  306. package/src/lint/post-synth/fixtures/TF020/scoped/main.tf +21 -0
  307. package/src/lint/post-synth/fixtures/TF020/scoped/modules/cdn/main.tf +13 -0
  308. package/src/lint/post-synth/fixtures/TF021/negative.tf +31 -0
  309. package/src/lint/post-synth/fixtures/TF021/positive-length.tf +8 -0
  310. package/src/lint/post-synth/fixtures/TF021/positive.tf +8 -0
  311. package/src/lint/post-synth/fixtures/TF022/negative-locator.tf +7 -0
  312. package/src/lint/post-synth/fixtures/TF022/negative.tf +10 -0
  313. package/src/lint/post-synth/fixtures/TF022/positive-nested.tf +10 -0
  314. package/src/lint/post-synth/fixtures/TF022/positive.tf +6 -0
  315. package/src/lint/post-synth/fixtures/TF023/negative/main.tf +15 -0
  316. package/src/lint/post-synth/fixtures/TF023/positive/main.tf +9 -0
  317. package/src/lint/post-synth/fixtures/TF023/positive/state.json +24 -0
  318. package/src/lint/post-synth/fixtures/TF024/live-clean/main.tf +9 -0
  319. package/src/lint/post-synth/fixtures/TF024/live-with-backend/main.tf +14 -0
  320. package/src/lint/post-synth/fixtures/TF024/live-with-cloud/main.tf +16 -0
  321. package/src/lint/post-synth/fixtures/TF025/live-clean/main.tf +13 -0
  322. package/src/lint/post-synth/fixtures/TF025/live-with-workspace-ref/main.tf +13 -0
  323. package/src/lint/post-synth/fixtures/TF026/live-default/main.tf +9 -0
  324. package/src/lint/post-synth/fixtures/TF026/live-explicit-delete/main.tf +13 -0
  325. package/src/lint/post-synth/fixtures/TF026/live-keep/main.tf +13 -0
  326. package/src/lint/post-synth/fixtures/TF027/live-default/main.tf +9 -0
  327. package/src/lint/post-synth/fixtures/TF027/live-untagged-delete/main.tf +13 -0
  328. package/src/lint/post-synth/fixtures/TF027/live-untagged-delete-scoped/main.tf +17 -0
  329. package/src/lint/post-synth/fixtures/TF027/live-untagged-report/main.tf +13 -0
  330. package/src/lint/post-synth/fixtures/TF028/live/main.tf +9 -0
  331. package/src/lint/post-synth/fixtures/TF028/stock/main.tf +10 -0
  332. package/src/lint/post-synth/fixtures/load.ts +108 -0
  333. package/src/lint/post-synth/index.ts +52 -0
  334. package/src/lint/post-synth/live-refusals-config-format.test.ts +143 -0
  335. package/src/lint/post-synth/module-rules.test.ts +153 -0
  336. package/src/lint/post-synth/module-source.test.ts +75 -0
  337. package/src/lint/post-synth/module-source.ts +121 -0
  338. package/src/lint/post-synth/post-synth.test.ts +73 -16
  339. package/src/lint/post-synth/scope.ts +107 -0
  340. package/src/lint/post-synth/single-block.test.ts +263 -0
  341. package/src/lint/post-synth/suppression.test.ts +110 -0
  342. package/src/lint/post-synth/tf001.ts +98 -18
  343. package/src/lint/post-synth/tf002.test.ts +93 -0
  344. package/src/lint/post-synth/tf002.ts +151 -0
  345. package/src/lint/post-synth/tf003.test.ts +75 -0
  346. package/src/lint/post-synth/tf003.ts +71 -0
  347. package/src/lint/post-synth/tf004.test.ts +47 -0
  348. package/src/lint/post-synth/tf004.ts +63 -0
  349. package/src/lint/post-synth/tf005.test.ts +57 -0
  350. package/src/lint/post-synth/tf005.ts +76 -0
  351. package/src/lint/post-synth/tf006.ts +53 -0
  352. package/src/lint/post-synth/tf007.ts +78 -0
  353. package/src/lint/post-synth/tf008.ts +75 -0
  354. package/src/lint/post-synth/tf009.ts +59 -0
  355. package/src/lint/post-synth/tf010.ts +51 -0
  356. package/src/lint/post-synth/tf011.ts +49 -0
  357. package/src/lint/post-synth/tf012.ts +47 -0
  358. package/src/lint/post-synth/tf013.ts +63 -0
  359. package/src/lint/post-synth/tf014.ts +72 -0
  360. package/src/lint/post-synth/tf015.ts +72 -0
  361. package/src/lint/post-synth/tf016.ts +75 -0
  362. package/src/lint/post-synth/tf017.ts +50 -0
  363. package/src/lint/post-synth/tf018.ts +72 -0
  364. package/src/lint/post-synth/tf019.ts +72 -0
  365. package/src/lint/post-synth/tf020.ts +123 -0
  366. package/src/lint/post-synth/tf021.ts +126 -0
  367. package/src/lint/post-synth/tf022.ts +61 -0
  368. package/src/lint/post-synth/tf024.test.ts +42 -0
  369. package/src/lint/post-synth/tf024.ts +70 -0
  370. package/src/lint/post-synth/tf025.test.ts +46 -0
  371. package/src/lint/post-synth/tf025.ts +101 -0
  372. package/src/lint/post-synth/tf026.test.ts +56 -0
  373. package/src/lint/post-synth/tf026.ts +84 -0
  374. package/src/lint/post-synth/tf027.test.ts +62 -0
  375. package/src/lint/post-synth/tf027.ts +74 -0
  376. package/src/lint/post-synth/tf028.test.ts +92 -0
  377. package/src/lint/post-synth/tf028.ts +96 -0
  378. package/src/lint/presets.test.ts +72 -0
  379. package/src/lint/rules/fixtures/TF101/negative-op.ts +2 -0
  380. package/src/lint/rules/fixtures/TF101/positive-op.ts +2 -0
  381. package/src/lint/rules/fixtures/load.ts +53 -0
  382. package/src/lint/rules/plan-before-apply.test.ts +112 -7
  383. package/src/lint/rules/plan-before-apply.ts +11 -0
  384. package/src/lint/secret-shape.test.ts +150 -0
  385. package/src/lint/secret-shape.ts +159 -0
  386. package/src/live-ownership.ts +60 -0
  387. package/src/lsp/completions.test.ts +3 -2
  388. package/src/lsp/option-keys.ts +12 -6
  389. package/src/op/activities/choudoufu.acceptance.test.ts +127 -0
  390. package/src/op/activities/choudoufu.test.ts +725 -0
  391. package/src/op/activities/index.ts +40 -4
  392. package/src/op/activities/live-detect.test.ts +143 -0
  393. package/src/op/activities/live-detect.ts +162 -0
  394. package/src/op/activities/registry.test.ts +11 -3
  395. package/src/op/activities/terraform.test.ts +7 -3
  396. package/src/op/activities/terraform.ts +861 -69
  397. package/src/op/activity-contracts.test.ts +147 -0
  398. package/src/op/activity-contracts.ts +178 -0
  399. package/src/op/adoption.test.ts +170 -0
  400. package/src/op/adoption.ts +241 -0
  401. package/src/op/builders.test.ts +60 -5
  402. package/src/op/builders.ts +95 -5
  403. package/src/op/resolve-root-mode.test.ts +85 -0
  404. package/src/op/resolve-root-mode.ts +86 -0
  405. package/src/plugin.test.ts +106 -0
  406. package/src/plugin.ts +186 -29
  407. package/src/skills/chant-terraform.md +1 -1
  408. package/src/validate.ts +10 -1
@@ -4,9 +4,8 @@
4
4
  *
5
5
  * Shaped after `lexicons/k3s/src/op/activities/k3s.ts`: `promisify(exec)` with
6
6
  * the caller's `AbortSignal` forwarded so a local timeout or Ctrl-C kills the
7
- * child, `safeHeartbeat` on an interval around the long calls, and every
8
- * command and environment string produced by a pure exported function so a
9
- * test can assert on it without running terraform.
7
+ * child, and every command and environment string produced by a pure exported
8
+ * function so a test can assert on it without running terraform.
10
9
  *
11
10
  * Two invariants hold for every call:
12
11
  *
@@ -18,15 +17,66 @@
18
17
  * (terraform answers `flag provided but not defined: -input`), so it
19
18
  * carries the environment variable alone.
20
19
  *
21
- * `terraformApply` takes a saved plan file and nothing else. A bare apply
22
- * re-plans at apply time, which is exactly the gap an approval gate exists to
23
- * close, so it is refused rather than offered.
20
+ * `terraformApply` takes a saved plan file and nothing else on a stock root,
21
+ * since a bare apply re-plans at apply time, which is exactly the gap an
22
+ * approval gate exists to close, so it is refused rather than offered. On a
23
+ * live root (#2103, `terraform.binary: "choudoufu"` plus a declared estate)
24
+ * it is the opposite: choudoufu refuses a plan file by design, so
25
+ * `terraformApply` refuses one there and runs a bare `apply -auto-approve`
26
+ * instead.
27
+ *
28
+ * `choudoufuLivePlan`, `choudoufuLiveLs` and `choudoufuLiveCheck` (#2103) are
29
+ * choudoufu-only activities living in this same module for the same reason
30
+ * the four above do: pure command builders, the `promisify(exec)` shape, and
31
+ * no dependency on the lexicon's HCL parse. `./live-detect.ts` is a
32
+ * deliberately separate, cheap regex-based read of "does this root declare a
33
+ * live estate," used only to decide how `terraformApply` reads a non-zero
34
+ * exit and to
35
+ * auto-detect `-estate` for the two live-only reads that need it; the
36
+ * accurate, AST-based version lives in `../../hcl/parse.ts` and stays out of
37
+ * this module's dependency graph. `choudoufu version` is checked once per
38
+ * module load (`ensureChoudoufuVersion`) and refuses a binary older than
39
+ * {@link MIN_CHOUDOUFU_VERSION}.
24
40
  */
25
41
  import type { TerraformConfig, TerraformRootConfig } from "../../config.js";
42
+ import { type AdoptionCandidate } from "../adoption.js";
26
43
  /** Plan file written into the root directory when a step names none. */
27
44
  export declare const DEFAULT_PLAN_FILE = "chant.tfplan";
28
45
  /** Binary used when the `terraform` namespace records no preference. */
29
46
  export declare const DEFAULT_TERRAFORM_BINARY = "terraform";
47
+ /** Where {@link choudoufuLivePlan} writes GitHub issue #788's JSON document, relative to the root directory. */
48
+ export declare const DEFAULT_LIVE_PLAN_DOCUMENT_FILE = "chant.live-plan.json";
49
+ /**
50
+ * choudoufu below this refuses. v0.12.0 brought `live-plan -json`, `live-ls`
51
+ * and `live-check -json` (#2103); v0.13.0 brought the approval artifact
52
+ * ([choudoufu #878](https://github.com/INTENTIUS/choudoufu/issues/878), PR
53
+ * 889): under a live block `plan -out=FILE` is accepted and `apply FILE`
54
+ * re-plans the live system and refuses on a mismatch with exit status 3.
55
+ * v0.14.0 brought the `-json` document on a configuration that names its own
56
+ * estate ([choudoufu #894](https://github.com/INTENTIUS/choudoufu/issues/894),
57
+ * PR 915), which is the shape every chant live root has: before it,
58
+ * {@link choudoufuLivePlan} could not produce the document for a real root at
59
+ * all. {@link terraformApply} depends on the exit-3 refusal and
60
+ * `describeResources()` and both document-reading Ops depend on the document,
61
+ * so the floor is the release that shipped the later of the two.
62
+ */
63
+ export declare const MIN_CHOUDOUFU_VERSION = "0.14.0";
64
+ /**
65
+ * choudoufu's own refusal summary for `-out` on the `live-plan -estate`
66
+ * surface (`internal/command/live_mode.go`). That is the one surface where a
67
+ * saved plan file is still refused: a directory reached through `-estate` has
68
+ * no `live` block, so plain `plan` and `apply` there are ordinary state-backed
69
+ * commands and a file written from this form would be applied by something
70
+ * that never heard of the estate. Under a `live` block `plan -out` is
71
+ * accepted (choudoufu #878).
72
+ */
73
+ export declare const CHOUDOUFU_LIVE_PLAN_OUT_REFUSAL = "Saved plan files are not available under live resource markers";
74
+ /** Exit status choudoufu's approval refusals carry: not 1 (any ordinary failure), not 2 (`-detailed-exitcode`). */
75
+ export declare const CHOUDOUFU_APPROVAL_EXIT_CODE = 3;
76
+ /** Summary line of choudoufu's refusal when the fresh live plan differs from the approved plan file. */
77
+ export declare const CHOUDOUFU_APPROVAL_MISMATCH_REFUSAL = "The approved plan no longer matches the live system";
78
+ /** Summary line of choudoufu's sibling refusal when the plan file was produced against another estate. */
79
+ export declare const CHOUDOUFU_WRONG_ESTATE_REFUSAL = "The approved plan belongs to a different estate";
30
80
  /** Fields every activity here takes: which root, and where the project is. */
31
81
  export interface TerraformRootArgs {
32
82
  /**
@@ -55,16 +105,73 @@ export interface TerraformPlanArgs extends TerraformRootArgs {
55
105
  }
56
106
  export interface TerraformApplyArgs extends TerraformRootArgs {
57
107
  /**
58
- * The saved plan file to apply, relative to the root directory — normally
108
+ * The saved plan file to apply, relative to the root directory, normally
59
109
  * `plan.out.planFile`, the Plan step's own output. Required: this activity
60
- * has no bare-apply mode.
110
+ * applies a saved plan and has no bare-apply mode, on either kind of root.
111
+ *
112
+ * On a live root this file is the approval artifact
113
+ * [choudoufu #878](https://github.com/INTENTIUS/choudoufu/issues/878) asked
114
+ * for, in the stock form choudoufu v0.13.0 shipped (PR 889). `plan -out`
115
+ * writes stock's own plan file; `apply <planfile>` never replays it, and
116
+ * never reads it as prior state or as an ownership answer. It re-plans
117
+ * against the live system the way every live-markers run does, then
118
+ * compares its fresh plan with the file's, down to the planned values, and
119
+ * refuses with exit status 3 when they differ. So the seam #2106 left named
120
+ * and unused on these args is now this field itself, and there is nothing
121
+ * separate to pass.
61
122
  */
62
- planFile: string;
123
+ planFile?: string;
63
124
  }
64
125
  export interface TerraformShowArgs extends TerraformRootArgs {
65
126
  /** Show this saved plan file. Omitted, the activity shows current state. */
66
127
  planFile?: string;
67
128
  }
129
+ export interface ChoudoufuLivePlanArgs extends TerraformRootArgs {
130
+ /**
131
+ * The estate whose ownership markers this run looks for (`-estate`).
132
+ * Omitted, it is auto-detected from the root's `live` block or
133
+ * `estate.chdf.hcl` sidecar, the same estate the root's own configuration
134
+ * declares, which is what a live root's every other activity assumes too.
135
+ */
136
+ estate?: string;
137
+ /**
138
+ * Render the human half as choudoufu's adoption ledger (`-adoption-only`)
139
+ * instead of the ordinary plan (#2105).
140
+ *
141
+ * This activity already makes two live reads, one for the `-json` document
142
+ * and one for the human render, because the document carries no rendering of
143
+ * the plan itself. This flag changes only the second of them, which is what
144
+ * makes it possible at all: choudoufu refuses `-adoption-only` and `-json` on
145
+ * one invocation ("this run cannot produce both reports at once"), so the two
146
+ * reports have to come from two runs whether or not chant wants both. The
147
+ * cost is that the second read asks the estate-wide sweep the account-bounded
148
+ * question ("which live resources carry no ownership marker at all"), so it
149
+ * is slower than the ordinary render, not faster.
150
+ */
151
+ adoptionOnly?: boolean;
152
+ }
153
+ export interface ChoudoufuLiveLsArgs extends TerraformRootArgs {
154
+ /** The estate to list (`-estate`). Omitted, auto-detected the same way {@link ChoudoufuLivePlanArgs.estate} is. */
155
+ estate?: string;
156
+ /** `-consistent`: poll past the Resource Groups Tagging API's eventual-consistency window. */
157
+ consistent?: boolean;
158
+ }
159
+ export type ChoudoufuLiveCheckArgs = TerraformRootArgs;
160
+ export interface ChoudoufuAdoptArgs extends TerraformRootArgs {
161
+ /**
162
+ * The adoptable matches to claim, normally `ledger.out.adoptions` from a
163
+ * {@link choudoufuLivePlan} step run with `adoptionOnly`. Each carries the
164
+ * two marker values and, where choudoufu printed one, the tagging command
165
+ * that writes them.
166
+ */
167
+ adoptions: AdoptionCandidate[];
168
+ /**
169
+ * The contested candidates the same ledger refused, normally
170
+ * `ledger.out.contested`. Passed in so the Op's result names what was not
171
+ * adopted and why, beside what was; nothing here is ever written.
172
+ */
173
+ contested?: AdoptionCandidate[];
174
+ }
68
175
  /** What {@link terraformInit} resolved. */
69
176
  export interface TerraformInitResult {
70
177
  /** Absolute path of the root module directory that was initialized. */
@@ -94,14 +201,148 @@ export interface TerraformPlanResult extends PlanChangeCounts {
94
201
  /** `terraform show -no-color <planFile>` — the human-readable plan. */
95
202
  text: string;
96
203
  }
204
+ /**
205
+ * Why a live apply refused the approval artifact it was handed. Both are
206
+ * choudoufu's exit status 3, which is neither 1 (any ordinary failure, which
207
+ * a pipeline must not route back to a reviewer) nor `-detailed-exitcode`'s 2.
208
+ *
209
+ * - `"approval-mismatch"`: the fresh live plan's change set or planned
210
+ * values differ from the approved file's.
211
+ * - `"wrong-estate"`: the file was produced from a configuration naming
212
+ * another estate.
213
+ */
214
+ export type TerraformApprovalRefusal = "approval-mismatch" | "wrong-estate";
97
215
  /** What {@link terraformApply} resolved. */
98
216
  export interface TerraformApplyResult {
99
- /** The plan file that was applied. */
100
- planFile: string;
217
+ /** The plan file that was applied, or that was refused. */
218
+ planFile?: string;
101
219
  /** Absolute path of the root module directory. */
102
220
  dir: string;
103
- /** Always `true` on success; the activity throws otherwise. */
221
+ /** `true` when the plan was applied. `false` exactly when {@link refused} is set. */
104
222
  applied: boolean;
223
+ /**
224
+ * Set when a live apply refused the approval artifact (choudoufu exit 3).
225
+ * This is a result, not a thrown error, so a workflow can route the run
226
+ * back to review instead of treating it as a broken step.
227
+ */
228
+ refused?: TerraformApprovalRefusal;
229
+ /** choudoufu's own refusal text, verbatim, when {@link refused} is set. */
230
+ refusal?: string;
231
+ }
232
+ /** Counts projected out of `live-plan -json`'s `unowned` section. */
233
+ export interface LivePlanUnownedCounts {
234
+ /** Live resources at a declared identity carrying no ownership marker for this estate. */
235
+ unowned: number;
236
+ /** Of those, how many an exact content match makes adoptable. */
237
+ adoptable: number;
238
+ }
239
+ /**
240
+ * What {@link choudoufuLivePlan} resolved. `adds`/`changes`/`destroys` (#2106,
241
+ * {@link PlanChangeCounts}) are parsed off the human-readable render's own
242
+ * "Plan: N to add, N to change, N to destroy." summary line
243
+ * ({@link parseChoudoufuPlanSummary}), not off GitHub issue #788's JSON
244
+ * document: that document is deliberately scoped to the three sections a
245
+ * stock plan's `-json` has no notion of at all (`bound`, `omissions`,
246
+ * `unowned`; `internal/command/views/live_plan.go`'s own `LivePlanDocument`
247
+ * doc comment says as much — "the stock plan's -json...can stay separate")
248
+ * and carries no resource-change diff of its own. The ordinary create/change/
249
+ * destroy diff — including the delete choudoufu's own `undeclared_tagged`
250
+ * quadrant folds into it for an orphaned marked resource, per that same
251
+ * file's `StatelessRemoval` doc comment ("the plan's own resource diff
252
+ * carries the destroy itself for those") — renders only in the human form,
253
+ * the same summary line a stock `terraform plan` prints
254
+ * (`internal/command/views/operation_test.go`'s own fixtures confirm the
255
+ * exact wording), which is why the human run's text, already fetched here for
256
+ * the approver to read, is what this activity parses instead of the JSON.
257
+ */
258
+ export interface ChoudoufuLivePlanResult extends LivePlanUnownedCounts, PlanChangeCounts {
259
+ /** `true` when `-detailed-exitcode` reported exit 2: the live plan proposes changes. */
260
+ drift: boolean;
261
+ /** GitHub issue #788's JSON document (`bound`, `omissions`, `unowned`), captured whole. */
262
+ json: unknown;
263
+ /**
264
+ * The human-readable plan, from a second `live-plan` run without `-json`
265
+ * (the document carries no render of it) — or, under
266
+ * {@link ChoudoufuLivePlanArgs.adoptionOnly}, choudoufu's own adoption ledger.
267
+ */
268
+ text: string;
269
+ /**
270
+ * chant's rendering of the adoption ledger over the `-json` document
271
+ * (#2105): one line per adoptable match with its address, its live identity
272
+ * and the two marker values, then any contested address, listed and never
273
+ * offered. Present on every run, `-adoption-only` or not, since it is a
274
+ * projection of the document rather than a second report.
275
+ */
276
+ ledger: string;
277
+ /**
278
+ * What a finding mode posts: {@link ChoudoufuLivePlanResult.text} and then
279
+ * {@link ChoudoufuLivePlanResult.ledger}. The one field an issue or PR body
280
+ * references, so that the JSON document has no path into a body at all.
281
+ */
282
+ finding: string;
283
+ /** Adoptable matches: exactly one live resource at the declared address, with the marker pair that claims it. */
284
+ adoptions: AdoptionCandidate[];
285
+ /** Every candidate at a declared address more than one live resource sits at. Never adoptable. */
286
+ contested: AdoptionCandidate[];
287
+ /** How many declared addresses are contested — the count `contested` above spells out. */
288
+ ambiguous: number;
289
+ /** Absolute path of the root module directory. */
290
+ dir: string;
291
+ /** Where the JSON document was written, relative to `dir`; {@link DEFAULT_LIVE_PLAN_DOCUMENT_FILE} unless overridden. */
292
+ documentPath: string;
293
+ /** The estate this plan ran against. */
294
+ estate: string;
295
+ }
296
+ /** What {@link choudoufuLiveLs} resolved. */
297
+ export interface ChoudoufuLiveLsResult {
298
+ /** The `-json` listing, parsed: every resource the account holds under the estate. */
299
+ json: unknown;
300
+ /** Absolute path of the root module directory (`live-ls` needs no configuration, but this activity still runs in it). */
301
+ dir: string;
302
+ /** The estate that was listed. */
303
+ estate: string;
304
+ }
305
+ /** One adoption {@link choudoufuAdopt} declined, with the reason an operator acts on. */
306
+ export interface AdoptionRefusal {
307
+ /** The declared instance address that was not claimed. */
308
+ addr: string;
309
+ /** The live resource's identity, when the refusal is about a particular one. */
310
+ identity: string;
311
+ /** Why, in a sentence, always naming the two marker values a hand-write would need. */
312
+ reason: string;
313
+ }
314
+ /** What {@link choudoufuAdopt} resolved. */
315
+ export interface ChoudoufuAdoptResult {
316
+ /**
317
+ * How the markers were written. Only `"tag-write"` today; the field exists
318
+ * because #2105 weighed a second mechanism (choudoufu's `adopt` policy verb)
319
+ * and a later run of this activity should say which one it used rather than
320
+ * leave a reader to infer it from the absence of a field. See the activity's
321
+ * own doc for why the policy verb is not reachable from outside the
322
+ * configuration.
323
+ */
324
+ mechanism: "tag-write";
325
+ /** The declared addresses whose live resources now carry this estate's markers. */
326
+ adopted: string[];
327
+ /** `adopted.length`, as a scalar an outcome attribute can carry. */
328
+ adoptedCount: number;
329
+ /** Every candidate this run declined, contested addresses included, with the reason. */
330
+ refused: AdoptionRefusal[];
331
+ /** How many declared addresses were contested — never adopted, always reported. */
332
+ ambiguous: number;
333
+ /** Absolute path of the root module directory. */
334
+ dir: string;
335
+ }
336
+ /** What {@link choudoufuLiveCheck} resolved. */
337
+ export interface ChoudoufuLiveCheckResult {
338
+ /** `true` when the configuration is refused under live resource markers (a non-zero exit). */
339
+ refused: boolean;
340
+ /** GitHub issue #790's declared roster, parsed, when the output could be parsed as JSON. */
341
+ json: unknown;
342
+ /** The raw `-json` output. */
343
+ text: string;
344
+ /** Absolute path of the root module directory. */
345
+ dir: string;
105
346
  }
106
347
  /** What {@link terraformShow} resolved. */
107
348
  export interface TerraformShowResult extends PlanChangeCounts {
@@ -149,11 +390,64 @@ export declare function terraformPlanCommand(opts: {
149
390
  varFiles?: string[];
150
391
  destroy?: boolean;
151
392
  }): string;
152
- /** `terraform apply <planFile>` — a saved plan, never a bare apply. */
393
+ /**
394
+ * `terraform apply <planFile>` — a saved plan, never a bare apply. The same
395
+ * command on a live root: choudoufu v0.13.0 admits a plan file under a `live`
396
+ * block, and a matched one applies without re-prompting, exactly as stock's
397
+ * own `apply <planfile>` does, so no `-auto-approve` is needed or passed.
398
+ */
153
399
  export declare function terraformApplyCommand(opts: {
154
400
  binary: string;
155
401
  planFile: string;
156
402
  }): string;
403
+ /**
404
+ * `live-plan -detailed-exitcode [-json] [-estate=<estate>]`. `-json` is what
405
+ * prints GitHub issue #788's document instead of the plan; the human render
406
+ * needs a second invocation without it (see {@link choudoufuLivePlan}).
407
+ *
408
+ * `estate` is omitted exactly when the configuration names its own estate.
409
+ * choudoufu refuses `-estate` beside a `live` block or an `estate.chdf.hcl`
410
+ * sidecar ("Estate named by both the live block and -estate"), and since
411
+ * v0.14.0 it does not need one: the run reads the declared name itself and
412
+ * prints the same document ([choudoufu #894](https://github.com/INTENTIUS/choudoufu/issues/894),
413
+ * PR 915). The flag is still how a root that declares nothing names an
414
+ * estate for the run.
415
+ *
416
+ * `adoptionOnly` makes that second invocation print the adoption ledger and
417
+ * nothing else (GitHub issue #587). It is refused here alongside `json`
418
+ * because choudoufu refuses the pair itself, and a builder that emitted a
419
+ * command the binary rejects would move the error to the far side of a
420
+ * process spawn for no gain.
421
+ */
422
+ export declare function choudoufuLivePlanCommand(opts: {
423
+ binary: string;
424
+ estate?: string;
425
+ json: boolean;
426
+ adoptionOnly?: boolean;
427
+ noColor?: boolean;
428
+ }): string;
429
+ /** `live-ls -estate=<estate> -json [-consistent]`. */
430
+ export declare function choudoufuLiveLsCommand(opts: {
431
+ binary: string;
432
+ estate: string;
433
+ consistent?: boolean;
434
+ }): string;
435
+ /**
436
+ * `live-check -json`. No `DIR` argument: the activity already runs in the
437
+ * root directory (`cwd`), so `-json` alone checks it, since DIR defaults to
438
+ * `.`. Makes no cloud calls; a non-zero exit is a refusal, not a failure this
439
+ * builder's caller need distinguish from one.
440
+ */
441
+ export declare function choudoufuLiveCheckCommand(opts: {
442
+ binary: string;
443
+ }): string;
444
+ /**
445
+ * Project `live-plan -json`'s `unowned` section into counts: how many live
446
+ * resources at a declared identity carry no ownership marker for this
447
+ * estate, and of those, how many an exact content match makes adoptable
448
+ * (`adopt_tofu_estate`/`adopt_tofu_address` present).
449
+ */
450
+ export declare function countLivePlanUnowned(document: unknown): LivePlanUnownedCounts;
157
451
  /**
158
452
  * `terraform show`. The one command here that takes no `-input` flag
159
453
  * (terraform answers `flag provided but not defined: -input`), so automation
@@ -171,6 +465,30 @@ export declare function terraformShowCommand(opts: {
171
465
  * counts as one add and one destroy, exactly as terraform reports it.
172
466
  */
173
467
  export declare function countPlanChanges(planJson: unknown): PlanChangeCounts;
468
+ /**
469
+ * Parse the ordinary "Plan: N to add, N to change, N to destroy." (or "...N
470
+ * to import, N to add...") summary line out of a human-readable `live-plan`
471
+ * render (#2106). "No changes." — the exit-0 case — matches nothing and
472
+ * reads as zero on every count, the same conservative default
473
+ * {@link countPlanChanges} falls back to on a shape it does not recognize.
474
+ */
475
+ export declare function parseChoudoufuPlanSummary(text: string): PlanChangeCounts;
476
+ /** Whether `version` is strictly older than `min`, comparing `major.minor.patch` numerically. */
477
+ export declare function isOlderVersion(version: string, min: string): boolean;
478
+ /**
479
+ * Extract the release version from `choudoufu version`'s human-readable
480
+ * output: `"choudoufu v0.13.0 (based on OpenTofu v1.13.0)\non darwin_arm64"`.
481
+ * `choudoufu version -json`'s `terraform_version` field is the wrong number
482
+ * here: it names the upstream OpenTofu base this build forked from, not the
483
+ * choudoufu release itself (`internal/command/views/version.go`), so this
484
+ * reads the human form's `choudoufu vX.Y.Z` prefix instead. A dev build with
485
+ * no release tag baked in (`version.Fork` unset) prints only the upstream
486
+ * line and carries no choudoufu version to check at all: `undefined` here,
487
+ * same as an output this cannot parse.
488
+ */
489
+ export declare function parseChoudoufuVersion(versionOutput: string): string | undefined;
490
+ /** Test-only: clear the cached version check so a test can simulate a fresh module load. */
491
+ export declare function __resetChoudoufuVersionCheckForTests(): void;
174
492
  /**
175
493
  * `terraform init` in the named root, with the root's `backendConfig` supplied
176
494
  * as `-backend-config` flags. Uses the longInfra profile: init downloads
@@ -192,10 +510,30 @@ export declare function terraformInit(args: TerraformInitArgs, signal?: AbortSig
192
510
  */
193
511
  export declare function terraformPlan(args: TerraformPlanArgs, signal?: AbortSignal): Promise<TerraformPlanResult>;
194
512
  /**
195
- * `terraform apply <planFile>` in the named root. A saved plan only: without
196
- * one, apply re-plans at apply time and acts on something no gate ever saw,
197
- * so a missing `planFile` is refused here rather than quietly widened into a
198
- * bare apply.
513
+ * Which of choudoufu's two approval refusals an exit-3 apply printed, or
514
+ * `undefined` when the output carries neither summary line. Reads both the
515
+ * stderr the diagnostic is written to and the stdout the fresh plan is
516
+ * rendered on, since the two travel separately.
517
+ */
518
+ export declare function classifyApprovalRefusal(output: string): TerraformApprovalRefusal | undefined;
519
+ /**
520
+ * `terraform apply <planFile>` in the named root, on a stock root and on a
521
+ * live one alike.
522
+ *
523
+ * Neither kind has a bare-apply mode here: without a saved `planFile`, apply
524
+ * re-plans at apply time and acts on something no gate ever saw, so a missing
525
+ * one is refused before the CLI runs. choudoufu v0.13.0 is what makes the
526
+ * live half of that true (choudoufu #878, PR 889): `plan -out` is accepted
527
+ * under a `live` block, and `apply <planfile>` re-plans against the live
528
+ * system, compares its fresh plan with the file's down to the planned values,
529
+ * and applies only when they agree.
530
+ *
531
+ * When they do not, choudoufu exits **3**, neither 1 (any ordinary failure)
532
+ * nor `-detailed-exitcode`'s 2, with one of two named refusals. That is an
533
+ * answer rather than a breakage, so it comes back as a result (`refused`,
534
+ * `refusal`) instead of a thrown error, and a workflow can route the run back
535
+ * to review. Exit 3 is read this way only on a live root; on a stock root
536
+ * nothing produces it and every non-zero exit stays a failure.
199
537
  *
200
538
  * Uses the longInfra profile.
201
539
  */
@@ -210,4 +548,115 @@ export declare function terraformApply(args: TerraformApplyArgs, signal?: AbortS
210
548
  * provider.
211
549
  */
212
550
  export declare function terraformShow(args: TerraformShowArgs, signal?: AbortSignal): Promise<TerraformShowResult>;
551
+ /**
552
+ * `choudoufu live-plan -detailed-exitcode -json -estate=<estate>`, plus a
553
+ * second `live-plan` without `-json` for the human-readable render. GitHub
554
+ * issue #788's JSON document carries no render of the plan itself
555
+ * (`views.LivePlanDocument` has no such field), so unlike `terraformPlan`'s
556
+ * single saved artifact this genuinely needs two live reads.
557
+ *
558
+ * The exit code is the answer, exactly as `terraformPlan`'s is: 0 is no
559
+ * drift, 2 is drift, and anything else is a failure thrown with choudoufu's
560
+ * own stderr attached. The JSON document is written to `documentPath` (under
561
+ * `dir`) for a later step or reviewer to open directly.
562
+ *
563
+ * Uses the longInfra profile: like `terraformPlan`, this reads the live
564
+ * system in full (the estate-wide sweep).
565
+ */
566
+ /**
567
+ * The JSON document within a `live-plan -json` stdout: everything from the
568
+ * first line that is a bare `{` to the end. Returns the input unchanged when
569
+ * no such line exists.
570
+ *
571
+ * Defensive, and kept deliberately. choudoufu v0.14.0 keeps `-json` stdout to
572
+ * the document on every form of live root, so on a supported binary this
573
+ * returns its input unchanged and the slice never fires: it was written for
574
+ * the `-estate` path's refresh progress lines
575
+ * ([choudoufu #894](https://github.com/INTENTIUS/choudoufu/issues/894), fixed
576
+ * in PR 915, which routes every human-prose renderer of a `-json` run through
577
+ * `views.View.StdoutOnStderr()`). What it buys is that a future writer put
578
+ * back on stdout ahead of the document costs a stale slice rather than a
579
+ * `JSON.parse` failure, and a stdout carrying no document at all still fails
580
+ * in `JSON.parse` with the real text in the error.
581
+ */
582
+ export declare function liveDocumentFrom(stdout: string): string;
583
+ export declare function choudoufuLivePlan(args: ChoudoufuLivePlanArgs & {
584
+ documentPath?: string;
585
+ }, signal?: AbortSignal): Promise<ChoudoufuLivePlanResult>;
586
+ /**
587
+ * `choudoufu live-ls -estate=<estate> -json [-consistent]`: every resource
588
+ * the account holds under the estate, read straight from the Resource Groups
589
+ * Tagging API. No configuration, state or record store is read.
590
+ *
591
+ * Uses the fastIdempotent profile: like `terraformShow`, this reads an
592
+ * artifact-shaped answer and does not plan.
593
+ */
594
+ export declare function choudoufuLiveLs(args: ChoudoufuLiveLsArgs, signal?: AbortSignal): Promise<ChoudoufuLiveLsResult>;
595
+ /**
596
+ * Claim the adoptable matches an adoption ledger found, by writing the two
597
+ * ownership markers onto each live resource (#2105).
598
+ *
599
+ * ## Why a tag write and not a policy verb
600
+ *
601
+ * choudoufu's `policy` block has an `adopt` verb for exactly this cell
602
+ * (`declared_untagged`), and `site/content/docs/use/migrate.md` names
603
+ * `policy { declared_untagged = "adopt" }` as the way to adopt a whole estate
604
+ * at once instead of one resource at a time. That would have been the smaller
605
+ * write: one apply, no tagging calls of chant's own. It is not reachable from
606
+ * outside the configuration, and #2105 checked both ways in:
607
+ *
608
+ * - a `live` block in a terraform override file is dropped in silence.
609
+ * `Module.mergeFile` (choudoufu's `internal/configs/module.go`) merges
610
+ * backends, cloud blocks, providers and resources from an override file
611
+ * and has no `Lives` case at all, so an `override.tf` carrying
612
+ * `terraform { live { policy { declared_untagged = "adopt" } } }` changes
613
+ * nothing. Measured, not inferred: a policy block with a deliberately
614
+ * invalid verb in an override file passes `live-check` clean, and the same
615
+ * block in a primary file is refused by name.
616
+ * - a second primary file carrying one is refused outright: "A module may
617
+ * have only one 'live' block." So is a sidecar beside an in-block form.
618
+ *
619
+ * Which leaves editing the root's own checked-in live configuration, running
620
+ * an apply, and putting it back — a mutation of a reviewed file, with a
621
+ * failure mode (a run that dies between the two edits) that leaves the estate
622
+ * declaring "adopt everything declared and unmarked" for every later apply.
623
+ * chant does not do that to a repository it does not own.
624
+ *
625
+ * So the mechanism is the tag write, which choudoufu's own migration guide
626
+ * calls the whole contract: "There is no `choudoufu adopt` command and no need
627
+ * for one. Two tags is the whole contract (`live/MARKERS.md`), so any tool
628
+ * that writes two tags can adopt a resource." The command each write runs is
629
+ * the paste-ready one choudoufu printed under `live-plan -adoption-only`,
630
+ * carried on the candidate — built from choudoufu's own provider
631
+ * configuration, so it lands on the region and endpoint the plan just read
632
+ * rather than wherever an operator's AWS CLI profile points, and shell-quoted
633
+ * by choudoufu for exactly this use.
634
+ *
635
+ * ## What it refuses
636
+ *
637
+ * A candidate with no printed command (a service whose tagging call this fork
638
+ * does not spell out: IAM, Route53, S3) is refused with its two marker values
639
+ * named, not guessed at. A contested address — more than one live resource at
640
+ * one declared identity — is refused because no single tag write claims it;
641
+ * `contested` is passed in so the Op's own result names what was refused
642
+ * beside what was written, and nothing in this function can adopt one, since
643
+ * `readAdoptionLedger` never puts a contested candidate in `adoptions`.
644
+ *
645
+ * Uses the longInfra profile: one tagging round trip per resource, against the
646
+ * cloud.
647
+ */
648
+ export declare function choudoufuAdopt(args: ChoudoufuAdoptArgs, signal?: AbortSignal): Promise<ChoudoufuAdoptResult>;
649
+ /**
650
+ * `choudoufu live-check -json`: whether the configuration in this root can
651
+ * move under live resource markers, and what stops it if it cannot. Makes no
652
+ * cloud calls and needs no `live` block at all, since the check this activity
653
+ * runs works on any configuration, which is why it needs no `estate`.
654
+ *
655
+ * A non-zero exit is a refusal choudoufu reports, not a failure of this
656
+ * activity: `refused: true` carries it back rather than throwing. An abort
657
+ * or a spawn failure (no numeric exit code) still throws.
658
+ *
659
+ * Uses the fastIdempotent profile: no cloud calls, no state.
660
+ */
661
+ export declare function choudoufuLiveCheck(args: ChoudoufuLiveCheckArgs, signal?: AbortSignal): Promise<ChoudoufuLiveCheckResult>;
213
662
  //# sourceMappingURL=terraform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"terraform.d.ts","sourceRoot":"","sources":["../../../src/op/activities/terraform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CA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