@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,197 @@
1
+ # Vendored for TF032 (chant #2287). Source: https://github.com/govuk-forms/forms-admin
2
+ # Path: .review_apps/ecs_task_definition.tf
3
+ # Commit: b338d4386619e3379a2555d65b8cfdf5d786905c
4
+ # Licence: MIT
5
+ # Copyright (c) 2022 Crown Copyright (Government Digital Service). MIT licence: https://github.com/govuk-forms/forms-admin/blob/b338d4386619e3379a2555d65b8cfdf5d786905c/LICENSE
6
+ # Copied verbatim below this header. Fires once on the postgres sidecar's literal POSTGRES_PASSWORD; the two containers whose environment is local.forms_admin_env_vars are not determined. The traefik dockerLabels keys are templates, which the reader drops without losing the rest.
7
+
8
+ locals {
9
+ logs_stream_prefix = "${data.terraform_remote_state.review.outputs.review_apps_log_group_name}/pr-${var.pull_request_number}"
10
+
11
+ # try() so that deploys succeed before the review environment state has
12
+ # published the assets outputs
13
+ assets_bucket_name = try(data.terraform_remote_state.review.outputs.assets_bucket_name, "govuk-forms-review-assets")
14
+ forms_admin_task_role_arn = try(data.terraform_remote_state.review.outputs.forms_admin_task_role_arn, null)
15
+
16
+ review_app_hostname = "pr-${var.pull_request_number}.admin.review.forms.service.gov.uk"
17
+
18
+ forms_admin_startup_commands = [
19
+ "echo $PATH",
20
+ "bundle install",
21
+ "echo $PATH",
22
+ "bin/rails db:prepare",
23
+ "bin/rails s -b 0.0.0.0"
24
+ ]
25
+
26
+ forms_admin_shell_script = join(" && ", local.forms_admin_startup_commands)
27
+
28
+ forms_admin_env_vars = [
29
+ { name = "DATABASE_URL", value = "postgres://postgres:postgres@127.0.0.1:5432" },
30
+ { name = "EMAIL", value = "review-app-submissions@review.forms.service.gov.uk" },
31
+ { name = "GOVUK_APP_DOMAIN", value = "publishing.service.gov.uk" },
32
+ { name = "PORT", value = "3000" },
33
+ { name = "RAILS_DEVELOPMENT_HOSTS", value = "pr-${var.pull_request_number}.admin.review.forms.service.gov.uk" },
34
+ { name = "RAILS_ENV", value = "production" },
35
+ { name = "SECRET_KEY_BASE", value = "unsecured_secret_key_material" },
36
+ { name = "SETTINGS__ACT_AS_USER_ENABLED", value = "true" },
37
+ { name = "SETTINGS__AUTH_PROVIDER", value = "developer" },
38
+ { name = "SETTINGS__AWS__ASSETS_S3_BUCKET_NAME", value = local.assets_bucket_name },
39
+ { name = "SETTINGS__FORMS_ENV", value = "review" },
40
+ { name = "SETTINGS__FORMS_RUNNER__URL", value = "https://forms.service.gov.uk" },
41
+ ]
42
+ }
43
+
44
+ resource "aws_ecs_task_definition" "task" {
45
+ family = "forms-admin-pr-${var.pull_request_number}"
46
+
47
+ network_mode = "awsvpc"
48
+ cpu = 256
49
+ memory = 1024
50
+
51
+ requires_compatibilities = ["FARGATE"]
52
+
53
+ runtime_platform {
54
+ operating_system_family = "LINUX"
55
+ cpu_architecture = "ARM64"
56
+ }
57
+
58
+ execution_role_arn = data.terraform_remote_state.review.outputs.ecs_task_execution_role_arn
59
+
60
+ # Gives the app permission to upload brand assets to the assets bucket
61
+ task_role_arn = local.forms_admin_task_role_arn
62
+
63
+ container_definitions = jsonencode([
64
+
65
+ # forms-admin
66
+ {
67
+ name = "forms-admin"
68
+ image = var.forms_admin_container_image
69
+ command = []
70
+ essential = true
71
+ environment = local.forms_admin_env_vars
72
+ # Uploaded files are buffered to tempfiles, and the app user cannot
73
+ # write to a volume mounted at /tmp, so the root filesystem cannot be
74
+ # read-only
75
+ readonlyRootFilesystem = false
76
+
77
+ dockerLabels = {
78
+ "traefik.http.middlewares.forms-admin-pr-${var.pull_request_number}.basicauth.users" : data.terraform_remote_state.review.outputs.traefik_basic_auth_credentials
79
+
80
+ "traefik.http.routers.forms-admin-pr-${var.pull_request_number}.rule" : "Host(`${local.review_app_hostname}`)",
81
+ "traefik.http.routers.forms-admin-pr-${var.pull_request_number}.service" : "forms-admin-pr-${var.pull_request_number}",
82
+ "traefik.http.routers.forms-admin-pr-${var.pull_request_number}.middlewares" : "forms-admin-pr-${var.pull_request_number}@ecs"
83
+
84
+ "traefik.http.services.forms-admin-pr-${var.pull_request_number}.loadbalancer.server.port" : "3000",
85
+ "traefik.http.services.forms-admin-pr-${var.pull_request_number}.loadbalancer.healthcheck.path" : "/up",
86
+ "traefik.enable" : "true",
87
+ },
88
+
89
+ portMappings = [
90
+ {
91
+ containerPort = 3000
92
+ hostPort = 3000
93
+ protocol = "tcp"
94
+ appProtocol = "http"
95
+ }
96
+ ]
97
+
98
+ mountPoints = []
99
+ systemControls = []
100
+ volumesFrom = []
101
+
102
+ logConfiguration = {
103
+ logDriver = "awslogs"
104
+ options = {
105
+ awslogs-group = data.terraform_remote_state.review.outputs.review_apps_log_group_name
106
+ awslogs-region = "eu-west-2"
107
+ awslogs-stream-prefix = "${local.logs_stream_prefix}/forms-admin"
108
+ }
109
+ }
110
+
111
+ healthCheck = {
112
+ command = ["CMD-SHELL", "wget -O - 'http://localhost:3000/up' || exit 1"]
113
+ interval = 30
114
+ retries = 5
115
+ startPeriod = 180
116
+ timeout = 5
117
+ }
118
+
119
+ dependsOn = [
120
+ {
121
+ containerName = "postgres"
122
+ condition = "HEALTHY"
123
+ }
124
+ ]
125
+ },
126
+
127
+ # postgres
128
+ {
129
+ name = "postgres"
130
+ image = "public.ecr.aws/docker/library/postgres:16.6"
131
+ command = []
132
+ essential = true
133
+
134
+ portMappings = [
135
+ {
136
+ containerPort = 5432
137
+ hostPort = 5432
138
+ protocol = "tcp"
139
+ }
140
+ ]
141
+
142
+ mountPoints = []
143
+ systemControls = []
144
+ volumesFrom = []
145
+
146
+ environment = [
147
+ { name = "POSTGRES_PASSWORD", value = "postgres" }
148
+ ]
149
+
150
+ logConfiguration = {
151
+ logDriver = "awslogs"
152
+ options = {
153
+ awslogs-group = data.terraform_remote_state.review.outputs.review_apps_log_group_name
154
+ awslogs-region = "eu-west-2"
155
+ awslogs-stream-prefix = "${local.logs_stream_prefix}/postgres"
156
+ }
157
+ }
158
+
159
+ healthCheck = {
160
+ command = ["CMD-SHELL", "psql -h localhost -p 5432 -U postgres -c \"SELECT current_timestamp - pg_postmaster_start_time();\""]
161
+ interval = 30
162
+ retries = 3
163
+ timeout = 5
164
+ }
165
+ },
166
+
167
+ # forms-admin-seeding
168
+ {
169
+ name = "forms-admin-seeding"
170
+ image = var.forms_admin_container_image
171
+ command = ["rake", "db:create", "db:migrate", "db:seed"]
172
+ essential = false
173
+ environment = local.forms_admin_env_vars
174
+ readonlyRootFilesystem = true
175
+
176
+ mountPoints = []
177
+ systemControls = []
178
+ volumesFrom = []
179
+
180
+ logConfiguration = {
181
+ logDriver = "awslogs"
182
+ options = {
183
+ awslogs-group = data.terraform_remote_state.review.outputs.review_apps_log_group_name
184
+ awslogs-region = "eu-west-2"
185
+ awslogs-stream-prefix = "${local.logs_stream_prefix}/forms-admin-seeding"
186
+ }
187
+ }
188
+
189
+ dependsOn = [
190
+ {
191
+ containerName = "postgres"
192
+ condition = "HEALTHY"
193
+ }
194
+ ]
195
+ },
196
+ ])
197
+ }
@@ -0,0 +1,54 @@
1
+ # Vendored for TF032 (chant #2287). Source: https://github.com/edstem-tech/paylink-platform
2
+ # Path: terraform/ecs.tf
3
+ # Commit: 2bbcbcce09434286cf90d20f69df0bd3ffa4cd00
4
+ # Licence: MIT
5
+ # Copyright (c) 2025 EdStem. MIT licence: permission notice at https://github.com/edstem-tech/paylink-platform/blob/2bbcbcce09434286cf90d20f69df0bd3ffa4cd00/LICENSE
6
+ # Copied verbatim below this header. Fires twice: DB_PASSWORD and PAYMENT_API_KEY are literals in environment.
7
+
8
+ resource "aws_ecs_cluster" "main" {
9
+ name = "paylink-prod"
10
+ }
11
+
12
+ resource "aws_ecs_task_definition" "api" {
13
+ family = "paylink-api"
14
+ network_mode = "awsvpc"
15
+ requires_compatibilities = ["FARGATE"]
16
+ cpu = "1024"
17
+ memory = "2048"
18
+ task_role_arn = aws_iam_role.task.arn
19
+ execution_role_arn = aws_iam_role.execution.arn
20
+
21
+ container_definitions = jsonencode([{
22
+ name = "api"
23
+ image = "${var.ecr_repo}:latest"
24
+
25
+ portMappings = [{ containerPort = 8080 }]
26
+
27
+ environment = [
28
+ { name = "SPRING_PROFILES_ACTIVE", value = "prod" },
29
+ { name = "DB_PASSWORD", value = "Pl-Pr0d-Db-2025!" },
30
+ { name = "PAYMENT_API_KEY", value = "pk_live_4RtYuIoP2aSdF6gH8jK" }
31
+ ]
32
+
33
+ healthCheck = {
34
+ command = ["CMD-SHELL", "curl -f http://localhost:8080/actuator/health || exit 1"]
35
+ interval = 10
36
+ timeout = 2
37
+ retries = 3
38
+ }
39
+ }])
40
+ }
41
+
42
+ resource "aws_ecs_service" "api" {
43
+ name = "paylink-api"
44
+ cluster = aws_ecs_cluster.main.id
45
+ task_definition = aws_ecs_task_definition.api.arn
46
+ desired_count = 2
47
+ launch_type = "FARGATE"
48
+
49
+ network_configuration {
50
+ subnets = aws_subnet.public[*].id
51
+ security_groups = [aws_security_group.service.id]
52
+ assign_public_ip = true
53
+ }
54
+ }
@@ -0,0 +1,39 @@
1
+ # Vendored for TF033 (chant #2288) from https://github.com/tmknom/example-pragmatic-terraform
2
+ # Path: 13/4.tf
3
+ # Commit: 7043f9216cf7fb55b3c5e9cd1926fe5da04a3ddb
4
+ # Licence: Apache-2.0, https://github.com/tmknom/example-pragmatic-terraform/blob/7043f9216cf7fb55b3c5e9cd1926fe5da04a3ddb/LICENSE
5
+ # The whole file, unmodified.
6
+ #
7
+ # TF033: silent. A MySQL DB instance with storage_encrypted = true and a customer managed kms_key_id.
8
+
9
+ resource "aws_db_instance" "example" {
10
+ identifier = "example"
11
+ engine = "mysql"
12
+ engine_version = "5.7.25"
13
+ instance_class = "db.t3.small"
14
+ allocated_storage = 20
15
+ max_allocated_storage = 100
16
+ storage_type = "gp2"
17
+ storage_encrypted = true
18
+ kms_key_id = aws_kms_key.example.arn
19
+ username = "admin"
20
+ password = "VeryStrongPassword!"
21
+ multi_az = true
22
+ publicly_accessible = false
23
+ backup_window = "09:10-09:40"
24
+ backup_retention_period = 30
25
+ maintenance_window = "mon:10:10-mon:10:40"
26
+ auto_minor_version_upgrade = false
27
+ deletion_protection = true
28
+ skip_final_snapshot = false
29
+ port = 3306
30
+ apply_immediately = false
31
+ vpc_security_group_ids = [module.mysql_sg.security_group_id]
32
+ parameter_group_name = aws_db_parameter_group.example.name
33
+ option_group_name = aws_db_option_group.example.name
34
+ db_subnet_group_name = aws_db_subnet_group.example.name
35
+
36
+ lifecycle {
37
+ ignore_changes = [password]
38
+ }
39
+ }
@@ -0,0 +1,25 @@
1
+ # Vendored for TF033 (chant #2288) from https://github.com/bridgecrewio/terragoat
2
+ # Path: terraform/aws/rds.tf
3
+ # Commit: 729f8da62c6a85ce4af5ad3d123de97776d954c4
4
+ # Licence: Apache-2.0, https://github.com/bridgecrewio/terragoat/blob/729f8da62c6a85ce4af5ad3d123de97776d954c4/LICENSE
5
+ # Excerpt: lines 1-15, unmodified.
6
+ #
7
+ # TF033: one info, Not determined. An aws_rds_cluster with no engine (Aurora; provider v5 defaulted it to "aurora")
8
+ # and no storage_encrypted. AWS encrypts Aurora clusters created on or after 2026-02-16 whatever the
9
+ # configuration says, and the configuration does not say when this one was created.
10
+
11
+ resource "aws_rds_cluster" "app1-rds-cluster" {
12
+ cluster_identifier = "app1-rds-cluster"
13
+ allocated_storage = 10
14
+ backup_retention_period = 0
15
+ tags = {
16
+ git_commit = "079fe74f6b96d887c245664fbd8cf676c92f20e5"
17
+ git_file = "terraform/aws/rds.tf"
18
+ git_last_modified_at = "2021-12-08 23:26:32"
19
+ git_last_modified_by = "tron47@gmail.com"
20
+ git_modifiers = "tron47"
21
+ git_org = "matansha"
22
+ git_repo = "terragoat"
23
+ yor_trace = "b6f2c2ec-0715-46a0-83d4-502e588826d1"
24
+ }
25
+ }
@@ -0,0 +1,93 @@
1
+ # Vendored for TF033 (chant #2288) from https://github.com/zoitech/terraform-aws-concourse
2
+ # Path: rds.tf
3
+ # Commit: fa3f3c3eecaa9144ea556e52cd3c43bff3bdd510
4
+ # Licence: MIT, https://github.com/zoitech/terraform-aws-concourse/blob/fa3f3c3eecaa9144ea556e52cd3c43bff3bdd510/LICENSE
5
+ # The whole file, unmodified.
6
+ #
7
+ # TF033: one error. aws_db_instance.postgres does not set storage_encrypted, and the provider default is false.
8
+ # Its snapshot_identifier = "" is not a source: the provider reads it with GetOk, so "" is the same as unset.
9
+ #
10
+ # Copyright (c) 2017 Zoi TechCon GmbH
11
+ #
12
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ # of this software and associated documentation files (the "Software"), to deal
14
+ # in the Software without restriction, including without limitation the rights
15
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ # copies of the Software, and to permit persons to whom the Software is
17
+ # furnished to do so, subject to the following conditions:
18
+ #
19
+ # The above copyright notice and this permission notice shall be included in all
20
+ # copies or substantial portions of the Software.
21
+ #
22
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ # SOFTWARE.
29
+
30
+ resource "aws_db_subnet_group" "postgres" {
31
+ name = "${lower(var.prefix)}-private"
32
+ subnet_ids = var.private_sn
33
+
34
+ tags = var.rds_tags
35
+ }
36
+
37
+ resource "aws_db_parameter_group" "concourse" {
38
+ name = "${var.prefix}-concourse-${var.postgres_family}"
39
+ family = var.postgres_family
40
+
41
+ tags = var.rds_tags
42
+ }
43
+
44
+ resource "aws_db_instance" "postgres" {
45
+ identifier = "${lower(var.prefix)}-concourse-db"
46
+ allocated_storage = var.concourse_db_storage
47
+ storage_type = "gp2"
48
+ engine = "postgres"
49
+ engine_version = var.postgres_version
50
+ instance_class = var.concourse_db_size
51
+ username = var.postgres_username
52
+ password = local.postgres_password
53
+ db_subnet_group_name = aws_db_subnet_group.postgres.id
54
+ parameter_group_name = aws_db_parameter_group.concourse.id
55
+ multi_az = var.postgres_multiaz
56
+ backup_retention_period = 35
57
+ maintenance_window = "Sat:21:00-Sun:00:00"
58
+ backup_window = "00:00-02:00"
59
+ vpc_security_group_ids = [aws_security_group.RuleGroupWsIn.id]
60
+ copy_tags_to_snapshot = true
61
+ snapshot_identifier = ""
62
+ skip_final_snapshot = true
63
+ final_snapshot_identifier = "LastSnap"
64
+ apply_immediately = true
65
+
66
+ lifecycle {
67
+ prevent_destroy = true
68
+ ignore_changes = [engine_version]
69
+ }
70
+
71
+ tags = merge({ Name = "${lower(var.prefix)}-concourse-db"}, var.rds_tags)
72
+ }
73
+
74
+ # Monitoring of DB events
75
+ resource "aws_sns_topic" "postgres" {
76
+ name = "${lower(var.prefix)}-rds-topic"
77
+
78
+ tags = merge({ Name = "${lower(var.prefix)}-rds-topic"}, var.sns_tags)
79
+ }
80
+
81
+ resource "aws_db_event_subscription" "postgres" {
82
+ name = "${lower(var.prefix)}-rds-sub"
83
+ sns_topic = aws_sns_topic.postgres.arn
84
+
85
+ source_type = "db-instance"
86
+ source_ids = [aws_db_instance.postgres.identifier]
87
+
88
+ # see here for further event categories
89
+ event_categories = [
90
+ "low storage",
91
+ ]
92
+ }
93
+
@@ -0,0 +1,50 @@
1
+ # Vendored for TF033 (chant #2288) from https://github.com/bridgecrewio/terragoat
2
+ # Path: terraform/aws/db-app.tf
3
+ # Commit: 729f8da62c6a85ce4af5ad3d123de97776d954c4
4
+ # Licence: Apache-2.0, https://github.com/bridgecrewio/terragoat/blob/729f8da62c6a85ce4af5ad3d123de97776d954c4/LICENSE
5
+ # Excerpt: lines 1-42, unmodified.
6
+ #
7
+ # TF033: one error. TerraGoat is a deliberately vulnerable estate; aws_db_instance.default writes storage_encrypted = false.
8
+
9
+ resource "aws_db_instance" "default" {
10
+
11
+ name = var.dbname
12
+ engine = "mysql"
13
+ option_group_name = aws_db_option_group.default.name
14
+ parameter_group_name = aws_db_parameter_group.default.name
15
+ db_subnet_group_name = aws_db_subnet_group.default.name
16
+ vpc_security_group_ids = ["${aws_security_group.default.id}"]
17
+
18
+ identifier = "rds-${local.resource_prefix.value}"
19
+ engine_version = "8.0" # Latest major version
20
+ instance_class = "db.t3.micro"
21
+ allocated_storage = "20"
22
+ username = "admin"
23
+ password = var.password
24
+ apply_immediately = true
25
+ multi_az = false
26
+ backup_retention_period = 0
27
+ storage_encrypted = false
28
+ skip_final_snapshot = true
29
+ monitoring_interval = 0
30
+ publicly_accessible = true
31
+
32
+ tags = merge({
33
+ Name = "${local.resource_prefix.value}-rds"
34
+ Environment = local.resource_prefix.value
35
+ }, {
36
+ git_commit = "e6d83b21346fe85d4fe28b16c0b2f1e0662eb1d7"
37
+ git_file = "terraform/aws/db-app.tf"
38
+ git_last_modified_at = "2023-04-27 12:47:51"
39
+ git_last_modified_by = "nadler@paloaltonetworks.com"
40
+ git_modifiers = "nadler/nimrodkor"
41
+ git_org = "bridgecrewio"
42
+ git_repo = "terragoat"
43
+ yor_trace = "47c13290-c2ce-48a7-b666-1b0085effb92"
44
+ })
45
+
46
+ # Ignore password changes from tf plan diff
47
+ lifecycle {
48
+ ignore_changes = ["password"]
49
+ }
50
+ }
@@ -0,0 +1,24 @@
1
+ # Vendored for TF034 (chant #2288) from https://github.com/covidgreen/covid-green-infra
2
+ # Path: sns.tf
3
+ # Commit: 864d159afca9367db21cca05b1e8eb58038bdbd6
4
+ # Licence: Apache-2.0, https://github.com/covidgreen/covid-green-infra/blob/864d159afca9367db21cca05b1e8eb58038bdbd6/LICENSE
5
+ # The whole file, unmodified.
6
+ #
7
+ # TF034: silent. Both topics set kms_master_key_id = aws_kms_alias.sns.arn, an attribute of a managed alias,
8
+ # which is never empty.
9
+
10
+ resource "aws_sns_topic" "callback_email_notifications" {
11
+ count = local.enable_callback_email_notifications_count
12
+
13
+ name = "${module.labels.id}-callback-email-notifications"
14
+ kms_master_key_id = aws_kms_alias.sns.arn
15
+ tags = module.labels.tags
16
+ }
17
+
18
+ resource "aws_sns_topic" "daily_registrations_reporter" {
19
+ count = local.lambda_daily_registrations_reporter_count
20
+
21
+ name = "${module.labels.id}-daily-registrations-reporter"
22
+ kms_master_key_id = aws_kms_alias.sns.arn
23
+ tags = module.labels.tags
24
+ }
@@ -0,0 +1,36 @@
1
+ # Vendored for TF034 (chant #2288) from https://github.com/radian-software/riju
2
+ # Path: tf/sns.tf
3
+ # Commit: ace9df7cd8f186b869af14d721e055864ed8f3e4
4
+ # Licence: MIT, https://github.com/radian-software/riju/blob/ace9df7cd8f186b869af14d721e055864ed8f3e4/LICENSE.md
5
+ # The whole file, unmodified.
6
+ #
7
+ # TF034: one warning. The topic does not set kms_master_key_id, and no AWS default encrypts a topic that names no key.
8
+ #
9
+ # Copyright (c) 2020–2022 [Radian LLC](https://radian.codes) and
10
+ # contributors
11
+ #
12
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ # of this software and associated documentation files (the "Software"), to deal
14
+ # in the Software without restriction, including without limitation the rights
15
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ # copies of the Software, and to permit persons to whom the Software is
17
+ # furnished to do so, subject to the following conditions:
18
+ #
19
+ # The above copyright notice and this permission notice shall be included in all
20
+ # copies or substantial portions of the Software.
21
+ #
22
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ # SOFTWARE.
29
+
30
+ resource "aws_sns_topic" "riju" {
31
+ name = "Riju"
32
+
33
+ tags = {
34
+ BillingSubcategory = "Riju:SNS"
35
+ }
36
+ }
@@ -0,0 +1,14 @@
1
+ # Vendored for TF034 (chant #2288) from https://github.com/Checkmarx/kics
2
+ # Path: assets/queries/terraform/aws/sns_topic_not_encrypted/test/positive1.tf
3
+ # Commit: 8a0f0bbaf380c6f9110bfe9808311f49aac45cde
4
+ # Licence: Apache-2.0, https://github.com/Checkmarx/kics/blob/8a0f0bbaf380c6f9110bfe9808311f49aac45cde/LICENSE
5
+ # The whole file, unmodified.
6
+ #
7
+ # KICS's own test corpus for "SNS Topic Not Encrypted".
8
+ #
9
+ # TF034: one warning. kms_master_key_id = "" names no key.
10
+
11
+ resource "aws_sns_topic" "user_updates" {
12
+ name = "user-updates-topic"
13
+ kms_master_key_id = ""
14
+ }
@@ -0,0 +1,43 @@
1
+ # Vendored for TF035 (chant #2288) from https://github.com/cds-snc/notification-terraform
2
+ # Path: aws/common/sqs.tf
3
+ # Commit: f202d882331fa2814170e4a65695291797af282d
4
+ # Licence: MIT, https://github.com/cds-snc/notification-terraform/blob/f202d882331fa2814170e4a65695291797af282d/LICENSE
5
+ # Excerpt: lines 60-73, unmodified.
6
+ #
7
+ # TF035: silent. The queue sets neither sqs_managed_sse_enabled nor kms_master_key_id, so AWS's SSE-SQS default
8
+ # encrypts it. This is the case the bridged WAW026 got wrong on every queue.
9
+ #
10
+ # Copyright (c) 2020 Canadian Digital Service – Service numérique canadien
11
+ #
12
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ # of this software and associated documentation files (the "Software"), to deal
14
+ # in the Software without restriction, including without limitation the rights
15
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ # copies of the Software, and to permit persons to whom the Software is
17
+ # furnished to do so, subject to the following conditions:
18
+ #
19
+ # The above copyright notice and this permission notice shall be included in all
20
+ # copies or substantial portions of the Software.
21
+ #
22
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ # SOFTWARE.
29
+
30
+ resource "aws_sqs_queue" "eks_notification_canada_cadelivery_receipts" {
31
+ provider = aws.core_services
32
+ name = "eks-notification-canada-cadelivery-receipts"
33
+ delay_seconds = 0
34
+ max_message_size = var.sqs_max_message_size
35
+ #4 Days
36
+ message_retention_seconds = 345600
37
+ receive_wait_time_seconds = 0
38
+ visibility_timeout_seconds = var.sqs_visibility_timeout_default
39
+
40
+ tags = {
41
+ Environment = var.env
42
+ }
43
+ }
@@ -0,0 +1,54 @@
1
+ # Vendored for TF035 (chant #2288) from https://github.com/cds-snc/notification-terraform
2
+ # Path: aws/common/sqs.tf
3
+ # Commit: f202d882331fa2814170e4a65695291797af282d
4
+ # Licence: MIT, https://github.com/cds-snc/notification-terraform/blob/f202d882331fa2814170e4a65695291797af282d/LICENSE
5
+ # Excerpt: lines 1-26, unmodified.
6
+ #
7
+ # TF035: silent. Three queues set sqs_managed_sse_enabled = true.
8
+ #
9
+ # Copyright (c) 2020 Canadian Digital Service – Service numérique canadien
10
+ #
11
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ # of this software and associated documentation files (the "Software"), to deal
13
+ # in the Software without restriction, including without limitation the rights
14
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ # copies of the Software, and to permit persons to whom the Software is
16
+ # furnished to do so, subject to the following conditions:
17
+ #
18
+ # The above copyright notice and this permission notice shall be included in all
19
+ # copies or substantial portions of the Software.
20
+ #
21
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ # SOFTWARE.
28
+
29
+ resource "aws_sqs_queue" "priority_db_tasks_queue" {
30
+ provider = aws.core_services
31
+ name = "${var.celery_queue_prefix}-${var.sqs_priority_db_tasks_queue_name}"
32
+ fifo_queue = true
33
+ deduplication_scope = "messageGroup"
34
+ fifo_throughput_limit = "perMessageGroupId"
35
+ sqs_managed_sse_enabled = true
36
+ # tfsec:ignore:AWS015 - Queues should be encrypted with customer managed KMS keys
37
+ # AWS managed encryption is good enough for us
38
+ }
39
+
40
+ resource "aws_sqs_queue" "normal_db_tasks_queue" {
41
+ provider = aws.core_services
42
+ name = "${var.celery_queue_prefix}-${var.sqs_normal_db_tasks_queue_name}"
43
+ sqs_managed_sse_enabled = true
44
+ # tfsec:ignore:AWS015 - Queues should be encrypted with customer managed KMS keys
45
+ # AWS managed encryption is good enough for us
46
+ }
47
+
48
+ resource "aws_sqs_queue" "bulk_db_tasks_queue" {
49
+ provider = aws.core_services
50
+ name = "${var.celery_queue_prefix}-${var.sqs_bulk_db_tasks_queue_name}"
51
+ sqs_managed_sse_enabled = true
52
+ # tfsec:ignore:AWS015 - Queues should be encrypted with customer managed KMS keys
53
+ # AWS managed encryption is good enough for us
54
+ }
@@ -0,0 +1,37 @@
1
+ # Vendored for TF035 (chant #2288) from https://github.com/cds-snc/notification-terraform
2
+ # Path: aws/common/sqs.tf
3
+ # Commit: f202d882331fa2814170e4a65695291797af282d
4
+ # Licence: MIT, https://github.com/cds-snc/notification-terraform/blob/f202d882331fa2814170e4a65695291797af282d/LICENSE
5
+ # Excerpt: lines 28-36, unmodified.
6
+ #
7
+ # TF035: one warning. sqs_managed_sse_enabled = false with no kms_master_key_id turns off the SSE-SQS default.
8
+ #
9
+ # Copyright (c) 2020 Canadian Digital Service – Service numérique canadien
10
+ #
11
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ # of this software and associated documentation files (the "Software"), to deal
13
+ # in the Software without restriction, including without limitation the rights
14
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ # copies of the Software, and to permit persons to whom the Software is
16
+ # furnished to do so, subject to the following conditions:
17
+ #
18
+ # The above copyright notice and this permission notice shall be included in all
19
+ # copies or substantial portions of the Software.
20
+ #
21
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ # SOFTWARE.
28
+
29
+ resource "aws_sqs_queue" "notify_internal_tasks_queue" {
30
+ provider = aws.core_services
31
+ name = "${var.celery_queue_prefix}notify-internal-tasks"
32
+ # This queue was created outside of terraform and has this value set to false in staging and production.
33
+ sqs_managed_sse_enabled = false
34
+ max_message_size = var.sqs_max_message_size
35
+ # This queue was created outside of terraform and has this value set to default in staging and production.
36
+ visibility_timeout_seconds = var.sqs_visibility_timeout_default
37
+ }