@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.
- package/dist/__fixtures__/terragrunt/affected-cases.d.ts +23 -0
- package/dist/__fixtures__/terragrunt/affected-cases.d.ts.map +1 -0
- package/dist/__fixtures__/terragrunt/record.d.ts +17 -0
- package/dist/__fixtures__/terragrunt/record.d.ts.map +1 -0
- package/dist/change-set.d.ts +67 -0
- package/dist/change-set.d.ts.map +1 -0
- package/dist/changed-roots.d.ts +30 -0
- package/dist/changed-roots.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +1 -1
- package/dist/commands.d.ts +26 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/components/capability-plugin.d.ts +54 -0
- package/dist/components/capability-plugin.d.ts.map +1 -0
- package/dist/composites/terraform-pin-rollout-op.d.ts +44 -0
- package/dist/composites/terraform-pin-rollout-op.d.ts.map +1 -0
- package/dist/config.d.ts +3 -3
- package/dist/hcl/descend.d.ts +1 -1
- package/dist/hcl/descend.d.ts.map +1 -1
- package/dist/hcl/edges.d.ts +2 -2
- package/dist/hcl/edges.d.ts.map +1 -1
- package/dist/hcl/jsonencode.d.ts +106 -0
- package/dist/hcl/jsonencode.d.ts.map +1 -0
- package/dist/hcl/marker.d.ts.map +1 -1
- package/dist/hcl/parse.d.ts +29 -1
- package/dist/hcl/parse.d.ts.map +1 -1
- package/dist/hcl/roots.d.ts +1 -1
- package/dist/hcl/roots.d.ts.map +1 -1
- package/dist/hcl/suppressions.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +22 -4
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/audit-lineage.d.ts +1 -1
- package/dist/lint/audit-lineage.d.ts.map +1 -1
- package/dist/lint/post-synth/flat-attributes.d.ts +69 -0
- package/dist/lint/post-synth/flat-attributes.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/module-source.d.ts +27 -1
- package/dist/lint/post-synth/module-source.d.ts.map +1 -1
- package/dist/lint/post-synth/terragrunt.d.ts +37 -0
- package/dist/lint/post-synth/terragrunt.d.ts.map +1 -0
- package/dist/lint/post-synth/tf002.d.ts +3 -1
- package/dist/lint/post-synth/tf002.d.ts.map +1 -1
- package/dist/lint/post-synth/tf030.d.ts +51 -0
- package/dist/lint/post-synth/tf030.d.ts.map +1 -0
- package/dist/lint/post-synth/tf031.d.ts +55 -0
- package/dist/lint/post-synth/tf031.d.ts.map +1 -0
- package/dist/lint/post-synth/tf032.d.ts +71 -0
- package/dist/lint/post-synth/tf032.d.ts.map +1 -0
- package/dist/lint/post-synth/tf033.d.ts +50 -0
- package/dist/lint/post-synth/tf033.d.ts.map +1 -0
- package/dist/lint/post-synth/tf034.d.ts +25 -0
- package/dist/lint/post-synth/tf034.d.ts.map +1 -0
- package/dist/lint/post-synth/tf035.d.ts +33 -0
- package/dist/lint/post-synth/tf035.d.ts.map +1 -0
- package/dist/lint/post-synth/tf036.d.ts +33 -0
- package/dist/lint/post-synth/tf036.d.ts.map +1 -0
- package/dist/lint/post-synth/tf037.d.ts +31 -0
- package/dist/lint/post-synth/tf037.d.ts.map +1 -0
- package/dist/lint/post-synth/tf038.d.ts +22 -0
- package/dist/lint/post-synth/tf038.d.ts.map +1 -0
- package/dist/lint/post-synth/tf039.d.ts +23 -0
- package/dist/lint/post-synth/tf039.d.ts.map +1 -0
- package/dist/lint/post-synth/tf040.d.ts +30 -0
- package/dist/lint/post-synth/tf040.d.ts.map +1 -0
- package/dist/lint/post-synth/tf041.d.ts +20 -0
- package/dist/lint/post-synth/tf041.d.ts.map +1 -0
- package/dist/lint/post-synth/tf042.d.ts +18 -0
- package/dist/lint/post-synth/tf042.d.ts.map +1 -0
- package/dist/lint/post-synth/tf043.d.ts +17 -0
- package/dist/lint/post-synth/tf043.d.ts.map +1 -0
- package/dist/lint/post-synth/tf044.d.ts +17 -0
- package/dist/lint/post-synth/tf044.d.ts.map +1 -0
- package/dist/lint/post-synth/tf045.d.ts +22 -0
- package/dist/lint/post-synth/tf045.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/okf/index.md +16 -0
- package/dist/okf/rules/TF030.md +11 -0
- package/dist/okf/rules/TF031.md +11 -0
- package/dist/okf/rules/TF032.md +11 -0
- package/dist/okf/rules/TF033.md +11 -0
- package/dist/okf/rules/TF034.md +11 -0
- package/dist/okf/rules/TF035.md +11 -0
- package/dist/okf/rules/TF036.md +11 -0
- package/dist/okf/rules/TF037.md +11 -0
- package/dist/okf/rules/TF038.md +11 -0
- package/dist/okf/rules/TF039.md +11 -0
- package/dist/okf/rules/TF040.md +11 -0
- package/dist/okf/rules/TF041.md +11 -0
- package/dist/okf/rules/TF042.md +11 -0
- package/dist/okf/rules/TF043.md +11 -0
- package/dist/okf/rules/TF044.md +11 -0
- package/dist/okf/rules/TF045.md +11 -0
- package/dist/op/activities/index.d.ts +4 -0
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/pin-rollout.d.ts +46 -0
- package/dist/op/activities/pin-rollout.d.ts.map +1 -0
- package/dist/op/activities/terraform.d.ts +24 -50
- package/dist/op/activities/terraform.d.ts.map +1 -1
- package/dist/op/activity-contracts.d.ts +66 -18
- package/dist/op/activity-contracts.d.ts.map +1 -1
- package/dist/op/builders.d.ts +9 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/pin/edit-ts.d.ts +21 -0
- package/dist/pin/edit-ts.d.ts.map +1 -0
- package/dist/pin/edit.d.ts +52 -0
- package/dist/pin/edit.d.ts.map +1 -0
- package/dist/pin/forge.d.ts +39 -0
- package/dist/pin/forge.d.ts.map +1 -0
- package/dist/pin/index.d.ts +22 -0
- package/dist/pin/index.d.ts.map +1 -0
- package/dist/pin/rollout.d.ts +116 -0
- package/dist/pin/rollout.d.ts.map +1 -0
- package/dist/pin/scan.d.ts +54 -0
- package/dist/pin/scan.d.ts.map +1 -0
- package/dist/pin/source.d.ts +93 -0
- package/dist/pin/source.d.ts.map +1 -0
- package/dist/pin/waves.d.ts +66 -0
- package/dist/pin/waves.d.ts.map +1 -0
- package/dist/plan-digest.d.ts +59 -0
- package/dist/plan-digest.d.ts.map +1 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/rules/flat-attributes.ts +146 -0
- package/dist/rules/module-source.ts +56 -1
- package/dist/rules/terragrunt.ts +76 -0
- package/dist/rules/tf002.ts +1 -1
- package/dist/rules/tf030.ts +290 -0
- package/dist/rules/tf031.ts +370 -0
- package/dist/rules/tf032.ts +226 -0
- package/dist/rules/tf033.ts +160 -0
- package/dist/rules/tf034.ts +63 -0
- package/dist/rules/tf035.ts +74 -0
- package/dist/rules/tf036.ts +119 -0
- package/dist/rules/tf037.ts +101 -0
- package/dist/rules/tf038.ts +71 -0
- package/dist/rules/tf039.ts +64 -0
- package/dist/rules/tf040.ts +76 -0
- package/dist/rules/tf041.ts +56 -0
- package/dist/rules/tf042.ts +42 -0
- package/dist/rules/tf043.ts +49 -0
- package/dist/rules/tf044.ts +51 -0
- package/dist/rules/tf045.ts +47 -0
- package/dist/terragrunt/affected.d.ts +119 -0
- package/dist/terragrunt/affected.d.ts.map +1 -0
- package/dist/terragrunt/index.d.ts +11 -0
- package/dist/terragrunt/index.d.ts.map +1 -0
- package/dist/terragrunt/mocks.d.ts +147 -0
- package/dist/terragrunt/mocks.d.ts.map +1 -0
- package/dist/terragrunt/run.d.ts +130 -0
- package/dist/terragrunt/run.d.ts.map +1 -0
- package/dist/terragrunt/units.d.ts +103 -0
- package/dist/terragrunt/units.d.ts.map +1 -0
- package/dist/terragrunt/wave.d.ts +89 -0
- package/dist/terragrunt/wave.d.ts.map +1 -0
- package/package.json +13 -3
- package/src/__fixtures__/change-set/choudoufu-set-plan.change-set.golden.json +95 -0
- package/src/__fixtures__/change-set/choudoufu-set-plan.json +76 -0
- package/src/__fixtures__/change-set/choudoufu.part.golden.json +173 -0
- package/src/__fixtures__/change-set/choudoufu.plan.json +610 -0
- package/src/__fixtures__/change-set/terraform.import-forget.plan.json +81 -0
- package/src/__fixtures__/change-set/terraform.part.golden.json +173 -0
- package/src/__fixtures__/change-set/terraform.plan.json +589 -0
- package/src/__fixtures__/change-set/tofu.part.golden.json +173 -0
- package/src/__fixtures__/change-set/tofu.plan.json +588 -0
- package/src/__fixtures__/change-set/v1.tf.txt +21 -0
- package/src/__fixtures__/change-set/v2-module-app.tf.txt +4 -0
- package/src/__fixtures__/change-set/v2.tf.txt +21 -0
- package/src/__fixtures__/pin/choudoufu-live-waves-n5.json +83 -0
- package/src/__fixtures__/pin/largeset-oci-n5/apply-order.txt +5 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/estate.chdf.hcl +6 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/main.tf +33 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/estate.chdf.hcl +6 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/main.tf +45 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/estate.chdf.hcl +6 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/main.tf +47 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/estate.chdf.hcl +6 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/main.tf +31 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/estate.chdf.hcl +6 -0
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/main.tf +27 -0
- package/src/__fixtures__/pin/largeset-oci-n5/fixture.json +77 -0
- package/src/__fixtures__/plan-summary/largeset-n5-bump.json +2071 -0
- package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.json +95 -0
- package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.md +22 -0
- package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.txt +12 -0
- package/src/__fixtures__/terragrunt/affected/catalog/units/web/terragrunt.hcl +3 -0
- package/src/__fixtures__/terragrunt/affected/gitignore +3 -0
- package/src/__fixtures__/terragrunt/affected/live/dev/app/terragrunt.hcl +3 -0
- package/src/__fixtures__/terragrunt/affected/live/dev/vpc/terragrunt.hcl +3 -0
- package/src/__fixtures__/terragrunt/affected/live/prod/app/terragrunt.hcl +3 -0
- package/src/__fixtures__/terragrunt/affected/live/stg/terragrunt.stack.hcl +5 -0
- package/src/__fixtures__/terragrunt/affected/modules/app/main.tf +6 -0
- package/src/__fixtures__/terragrunt/affected/modules/app/policy.json +1 -0
- package/src/__fixtures__/terragrunt/affected/modules/net/main.tf +2 -0
- package/src/__fixtures__/terragrunt/affected/modules/thing/main.tf +3 -0
- package/src/__fixtures__/terragrunt/affected/root.hcl +5 -0
- package/src/__fixtures__/terragrunt/affected-cases.ts +126 -0
- package/src/__fixtures__/terragrunt/five-units/catalog/units/thing/terragrunt.hcl +3 -0
- package/src/__fixtures__/terragrunt/five-units/live/dev/app/terragrunt.hcl +13 -0
- package/src/__fixtures__/terragrunt/five-units/live/dev/db/terragrunt.hcl +8 -0
- package/src/__fixtures__/terragrunt/five-units/live/dev/vpc/terragrunt.hcl +3 -0
- package/src/__fixtures__/terragrunt/five-units/live/prod/app/terragrunt.hcl +8 -0
- package/src/__fixtures__/terragrunt/five-units/live/prod/vpc/terragrunt.hcl +3 -0
- package/src/__fixtures__/terragrunt/five-units/modules/thing/main.tf +7 -0
- package/src/__fixtures__/terragrunt/five-units/root.hcl +5 -0
- package/src/__fixtures__/terragrunt/record.ts +56 -0
- package/src/__fixtures__/terragrunt/recorded/affected-find.json +50 -0
- package/src/__fixtures__/terragrunt/recorded/failed-plan-report.json +36 -0
- package/src/__fixtures__/terragrunt/recorded/find.json +67 -0
- package/src/__fixtures__/terragrunt/recorded/version.txt +1 -0
- package/src/__fixtures__/terragrunt/recorded/wave-1/apply-report.json +22 -0
- package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/dev/vpc/tfplan.json +1 -0
- package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/prod/vpc/tfplan.json +1 -0
- package/src/__fixtures__/terragrunt/recorded/wave-1/plan-report.json +22 -0
- package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/dev/db/tfplan.json +1 -0
- package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/prod/app/tfplan.json +1 -0
- package/src/__fixtures__/terragrunt/recorded/wave-2/plan-report.json +22 -0
- package/src/change-set-combined-run.test.ts +156 -0
- package/src/change-set.test.ts +151 -0
- package/src/change-set.ts +273 -0
- package/src/changed-roots.test.ts +58 -0
- package/src/changed-roots.ts +102 -0
- package/src/commands.ts +112 -0
- package/src/components/capability-plugin.test.ts +91 -0
- package/src/components/capability-plugin.ts +131 -0
- package/src/components/pr-loop.tofu.test.ts +244 -0
- package/src/composites/terraform-pin-rollout-op.test.ts +69 -0
- package/src/composites/terraform-pin-rollout-op.ts +60 -0
- package/src/hcl/descend.ts +1 -1
- package/src/hcl/edges.ts +2 -2
- package/src/hcl/jsonencode.test.ts +226 -0
- package/src/hcl/jsonencode.ts +454 -0
- package/src/hcl/parse.test.ts +25 -0
- package/src/hcl/parse.ts +91 -6
- package/src/hcl/roots.ts +1 -1
- package/src/hcl/suppressions.ts +8 -2
- package/src/index.ts +18 -0
- package/src/lint/audit-catalog.ts +230 -0
- package/src/lint/audit-lineage.ts +155 -1
- package/src/lint/audit.test.ts +3 -1
- package/src/lint/post-synth/estate-2284.test.ts +68 -0
- package/src/lint/post-synth/fixtures/TF030/negative-rules.tf +45 -0
- package/src/lint/post-synth/fixtures/TF030/negative.tf +55 -0
- package/src/lint/post-synth/fixtures/TF030/not-determined-port.tf +28 -0
- package/src/lint/post-synth/fixtures/TF030/not-determined-standalone.tf +32 -0
- package/src/lint/post-synth/fixtures/TF030/not-determined-vpc-rule.tf +21 -0
- package/src/lint/post-synth/fixtures/TF030/not-determined.tf +39 -0
- package/src/lint/post-synth/fixtures/TF030/positive-ipv6.tf +44 -0
- package/src/lint/post-synth/fixtures/TF030/positive-mixed.tf +36 -0
- package/src/lint/post-synth/fixtures/TF030/positive-standalone.tf +25 -0
- package/src/lint/post-synth/fixtures/TF030/positive.tf +43 -0
- package/src/lint/post-synth/fixtures/TF031/negative.tf +89 -0
- package/src/lint/post-synth/fixtures/TF031/not-determined.tf +139 -0
- package/src/lint/post-synth/fixtures/TF031/positive-data-source.tf +57 -0
- package/src/lint/post-synth/fixtures/TF031/positive-heredoc.tf +149 -0
- package/src/lint/post-synth/fixtures/TF031/positive-jsonencode.tf +115 -0
- package/src/lint/post-synth/fixtures/TF032/negative-heredoc.tf +20 -0
- package/src/lint/post-synth/fixtures/TF032/negative-references.tf +214 -0
- package/src/lint/post-synth/fixtures/TF032/negative.tf +99 -0
- package/src/lint/post-synth/fixtures/TF032/positive-heredoc.tf +22 -0
- package/src/lint/post-synth/fixtures/TF032/positive-sidecar.tf +197 -0
- package/src/lint/post-synth/fixtures/TF032/positive.tf +54 -0
- package/src/lint/post-synth/fixtures/TF033/negative.tf +39 -0
- package/src/lint/post-synth/fixtures/TF033/not-determined-aurora.tf +25 -0
- package/src/lint/post-synth/fixtures/TF033/positive-absent.tf +93 -0
- package/src/lint/post-synth/fixtures/TF033/positive.tf +50 -0
- package/src/lint/post-synth/fixtures/TF034/negative.tf +24 -0
- package/src/lint/post-synth/fixtures/TF034/positive-absent.tf +36 -0
- package/src/lint/post-synth/fixtures/TF034/positive.tf +14 -0
- package/src/lint/post-synth/fixtures/TF035/negative-absent.tf +43 -0
- package/src/lint/post-synth/fixtures/TF035/negative.tf +54 -0
- package/src/lint/post-synth/fixtures/TF035/positive.tf +37 -0
- package/src/lint/post-synth/fixtures/TF036/negative.tf +61 -0
- package/src/lint/post-synth/fixtures/TF036/not-determined.tf +28 -0
- package/src/lint/post-synth/fixtures/TF036/positive.tf +38 -0
- package/src/lint/post-synth/fixtures/TF037/negative-exclusion.tf +63 -0
- package/src/lint/post-synth/fixtures/TF037/negative.tf +27 -0
- package/src/lint/post-synth/fixtures/TF037/not-determined.tf +27 -0
- package/src/lint/post-synth/fixtures/TF037/positive-absent.tf +15 -0
- package/src/lint/post-synth/fixtures/TF037/positive.tf +26 -0
- package/src/lint/post-synth/fixtures/TF038/positive.tf +3 -0
- package/src/lint/post-synth/fixtures/TF039/positive.tf +4 -0
- package/src/lint/post-synth/fixtures/TF041/negative/terragrunt.hcl +12 -0
- package/src/lint/post-synth/fixtures/TF041/positive/terragrunt.hcl +7 -0
- package/src/lint/post-synth/fixtures/TF041/positive-apply/terragrunt.hcl +8 -0
- package/src/lint/post-synth/fixtures/TF042/negative/terragrunt.hcl +13 -0
- package/src/lint/post-synth/fixtures/TF042/positive/terragrunt.hcl +9 -0
- package/src/lint/post-synth/fixtures/TF043/negative/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/TF043/negative-other/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/TF043/positive-git/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/TF043/positive-oci/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/TF043/positive-tfr/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/TF044/negative/terragrunt.hcl +9 -0
- package/src/lint/post-synth/fixtures/TF044/positive/terragrunt.hcl +7 -0
- package/src/lint/post-synth/fixtures/TF044/positive-generate/terragrunt.hcl +9 -0
- package/src/lint/post-synth/fixtures/TF045/negative/root.hcl +1 -0
- package/src/lint/post-synth/fixtures/TF045/negative/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/TF045/positive/root.hcl +9 -0
- package/src/lint/post-synth/fixtures/TF045/positive/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/TF045/unit-only/terragrunt.hcl +3 -0
- package/src/lint/post-synth/fixtures/estate-2284/clean/main.tf +132 -0
- package/src/lint/post-synth/fixtures/estate-2284/violating/main.tf +112 -0
- package/src/lint/post-synth/flat-attributes.ts +146 -0
- package/src/lint/post-synth/index.ts +32 -0
- package/src/lint/post-synth/module-source.test.ts +42 -1
- package/src/lint/post-synth/module-source.ts +56 -1
- package/src/lint/post-synth/terragrunt.ts +76 -0
- package/src/lint/post-synth/tf002.ts +1 -1
- package/src/lint/post-synth/tf030.test.ts +219 -0
- package/src/lint/post-synth/tf030.ts +290 -0
- package/src/lint/post-synth/tf031.test.ts +229 -0
- package/src/lint/post-synth/tf031.ts +370 -0
- package/src/lint/post-synth/tf032.test.ts +127 -0
- package/src/lint/post-synth/tf032.ts +226 -0
- package/src/lint/post-synth/tf033.test.ts +126 -0
- package/src/lint/post-synth/tf033.ts +160 -0
- package/src/lint/post-synth/tf034.test.ts +71 -0
- package/src/lint/post-synth/tf034.ts +63 -0
- package/src/lint/post-synth/tf035.test.ts +68 -0
- package/src/lint/post-synth/tf035.ts +74 -0
- package/src/lint/post-synth/tf036.test.ts +87 -0
- package/src/lint/post-synth/tf036.ts +119 -0
- package/src/lint/post-synth/tf037.test.ts +88 -0
- package/src/lint/post-synth/tf037.ts +101 -0
- package/src/lint/post-synth/tf038.test.ts +51 -0
- package/src/lint/post-synth/tf038.ts +71 -0
- package/src/lint/post-synth/tf039.test.ts +40 -0
- package/src/lint/post-synth/tf039.ts +64 -0
- package/src/lint/post-synth/tf040.test.ts +55 -0
- package/src/lint/post-synth/tf040.ts +76 -0
- package/src/lint/post-synth/tf041.test.ts +50 -0
- package/src/lint/post-synth/tf041.ts +56 -0
- package/src/lint/post-synth/tf042.test.ts +19 -0
- package/src/lint/post-synth/tf042.ts +42 -0
- package/src/lint/post-synth/tf043.test.ts +65 -0
- package/src/lint/post-synth/tf043.ts +49 -0
- package/src/lint/post-synth/tf044.test.ts +27 -0
- package/src/lint/post-synth/tf044.ts +51 -0
- package/src/lint/post-synth/tf045.test.ts +30 -0
- package/src/lint/post-synth/tf045.ts +47 -0
- package/src/op/activities/index.ts +4 -0
- package/src/op/activities/pin-rollout.ts +77 -0
- package/src/op/activities/terraform.test.ts +13 -0
- package/src/op/activities/terraform.ts +46 -86
- package/src/op/activity-contracts.test.ts +4 -1
- package/src/op/activity-contracts.ts +42 -0
- package/src/op/builders.ts +13 -0
- package/src/pin/bundle.test.ts +53 -0
- package/src/pin/edit-ts.test.ts +39 -0
- package/src/pin/edit-ts.ts +77 -0
- package/src/pin/edit.test.ts +199 -0
- package/src/pin/edit.ts +157 -0
- package/src/pin/forge.ts +85 -0
- package/src/pin/index.ts +22 -0
- package/src/pin/rollout.test.ts +232 -0
- package/src/pin/rollout.ts +451 -0
- package/src/pin/scan.ts +309 -0
- package/src/pin/source.ts +206 -0
- package/src/pin/waves.test.ts +101 -0
- package/src/pin/waves.ts +125 -0
- package/src/plan-digest.ts +99 -0
- package/src/plan-summary.test.ts +154 -0
- package/src/plugin.ts +25 -2
- package/src/terragrunt/affected.acceptance.test.ts +83 -0
- package/src/terragrunt/affected.test.ts +177 -0
- package/src/terragrunt/affected.ts +348 -0
- package/src/terragrunt/index.ts +11 -0
- package/src/terragrunt/mocks.acceptance.test.ts +105 -0
- package/src/terragrunt/mocks.test.ts +309 -0
- package/src/terragrunt/mocks.ts +324 -0
- package/src/terragrunt/run.ts +369 -0
- package/src/terragrunt/terragrunt.acceptance.test.ts +122 -0
- package/src/terragrunt/terragrunt.test.ts +332 -0
- package/src/terragrunt/units.ts +235 -0
- package/src/terragrunt/wave.ts +181 -0
package/src/hcl/suppressions.ts
CHANGED
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
import type { SuppressionDirective, SuppressionIds } from "@intentius/chant/lint/suppressions";
|
|
28
28
|
|
|
29
29
|
/** A block header keyword with zero labels (`terraform {`, `locals {`). */
|
|
30
|
-
const BARE_RE = /^\s*(terraform|locals)\s*\{/;
|
|
30
|
+
const BARE_RE = /^\s*(terraform|locals|remote_state)\s*\{/;
|
|
31
31
|
/** One label (`provider "aws" {`, `module "vpc" {`, `variable "x" {`, `output "x" {`). */
|
|
32
|
-
const ONE_LABEL_RE = /^\s*(provider|module|variable|output)\s+"([^"]*)"\s*\{/;
|
|
32
|
+
const ONE_LABEL_RE = /^\s*(provider|module|variable|output|dependency|generate)\s+"([^"]*)"\s*\{/;
|
|
33
33
|
/** Two labels (`resource "aws_s3_bucket" "assets" {`, `data "aws_ami" "x" {`). */
|
|
34
34
|
const TWO_LABEL_RE = /^\s*(resource|data)\s+"([^"]*)"\s+"([^"]*)"\s*\{/;
|
|
35
35
|
|
|
@@ -43,6 +43,12 @@ function addressFor(keyword: string, labels: string[]): string {
|
|
|
43
43
|
return "terraform";
|
|
44
44
|
case "locals":
|
|
45
45
|
return "locals";
|
|
46
|
+
case "remote_state":
|
|
47
|
+
return "remote_state";
|
|
48
|
+
case "dependency":
|
|
49
|
+
return `dependency.${labels[0]}`;
|
|
50
|
+
case "generate":
|
|
51
|
+
return `generate.${labels[0]}`;
|
|
46
52
|
case "provider":
|
|
47
53
|
return `provider.${labels[0]}`;
|
|
48
54
|
case "module":
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
// Plugin
|
|
2
2
|
export { terraformPlugin } from "./plugin";
|
|
3
3
|
|
|
4
|
+
// The `terraform-apply` component verb (#3049), contributed to core's
|
|
5
|
+
// capability-plugin seam. Core loads `terraformCapabilityPlugin` when a
|
|
6
|
+
// project's chant.config lists this lexicon, so a component can deploy a root
|
|
7
|
+
// and a fan-out can run many of them in gated waves.
|
|
8
|
+
export {
|
|
9
|
+
terraformCapabilityPlugin,
|
|
10
|
+
terraformApplyCapability,
|
|
11
|
+
TERRAFORM_VERB_FAMILIES,
|
|
12
|
+
type TerraformApplyStepInput,
|
|
13
|
+
type TerraformApplyStepOutput,
|
|
14
|
+
} from "./components/capability-plugin";
|
|
15
|
+
|
|
4
16
|
// Serializer
|
|
5
17
|
export { terraformSerializer } from "./serializer";
|
|
6
18
|
|
|
@@ -55,6 +67,7 @@ export {
|
|
|
55
67
|
choudoufuLiveLs,
|
|
56
68
|
choudoufuLiveCheck,
|
|
57
69
|
choudoufuAdopt,
|
|
70
|
+
terraformPinRollout,
|
|
58
71
|
} from "./op/builders";
|
|
59
72
|
|
|
60
73
|
// The adoption ledger over `live-plan -json`'s document (#2105). Pure, and
|
|
@@ -90,6 +103,11 @@ export type {
|
|
|
90
103
|
export { TerraformAdoptOp } from "./composites/terraform-adopt-op";
|
|
91
104
|
export type { TerraformAdoptOpConfig, TerraformAdoptOpResources } from "./composites/terraform-adopt-op";
|
|
92
105
|
|
|
106
|
+
// One pin-bump PR per wave (#3189). The pin edit, wave plan and rollout run
|
|
107
|
+
// are in the `@intentius/chant-lexicon-terraform/pin` subpath.
|
|
108
|
+
export { TerraformPinRolloutOp } from "./composites/terraform-pin-rollout-op";
|
|
109
|
+
export type { TerraformPinRolloutOpConfig, TerraformPinRolloutOpResources } from "./composites/terraform-pin-rollout-op";
|
|
110
|
+
|
|
93
111
|
// Live observation over `terraform show -json` (#2087). The plugin reaches
|
|
94
112
|
// `describeResources` through a dynamic import; the ownership keys are here
|
|
95
113
|
// because `ownershipChannel` declares them eagerly.
|
|
@@ -17,12 +17,60 @@ const HASHICORP_STYLE_VARIABLES: Authority = {
|
|
|
17
17
|
url: "https://developer.hashicorp.com/terraform/language/style#variables",
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
const AWS_IAM_LEAST_PRIVILEGE: Authority = {
|
|
21
|
+
name: "AWS IAM security best practices (Apply least-privilege permissions)",
|
|
22
|
+
url: "https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// TF032's authority: the ECS developer guide's own instruction for credentials,
|
|
26
|
+
// which is the remediation the rule's message gives.
|
|
27
|
+
const ECS_SENSITIVE_DATA: Authority = {
|
|
28
|
+
name: "Amazon ECS Developer Guide: Pass sensitive data to an Amazon ECS container",
|
|
29
|
+
url: "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html",
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// TF033-TF037 (#2288) cite the AWS service guide page that states the
|
|
33
|
+
// encryption or immutability control each rule checks.
|
|
34
|
+
const AWS_RDS_ENCRYPTION: Authority = {
|
|
35
|
+
name: "Amazon RDS User Guide: Encrypting Amazon RDS resources",
|
|
36
|
+
url: "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html",
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const AWS_SNS_SSE: Authority = {
|
|
40
|
+
name: "Amazon SNS Developer Guide: Securing Amazon SNS data with server-side encryption",
|
|
41
|
+
url: "https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html",
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const AWS_SQS_SSE: Authority = {
|
|
45
|
+
name: "Amazon SQS Developer Guide: Encryption at rest in Amazon SQS",
|
|
46
|
+
url: "https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html",
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const AWS_EBS_ENCRYPTION: Authority = {
|
|
50
|
+
name: "Amazon EBS User Guide: Amazon EBS encryption",
|
|
51
|
+
url: "https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption.html",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const AWS_ECR_TAG_IMMUTABILITY: Authority = {
|
|
55
|
+
name: "Amazon ECR User Guide: Preventing image tags from being overwritten",
|
|
56
|
+
url: "https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html",
|
|
57
|
+
};
|
|
58
|
+
|
|
20
59
|
// The vendor guides behind TF014, TF015 and TF021 are credited as lineage in
|
|
21
60
|
// ./audit-lineage.ts, not as `authority` here. `authority` is reserved for
|
|
22
61
|
// security rules that fail a merge (packages/core/src/audit/catalog.test.ts
|
|
23
62
|
// holds both halves of that invariant), and these three are correctness and
|
|
24
63
|
// best-practice rules (#2112).
|
|
25
64
|
|
|
65
|
+
/**
|
|
66
|
+
* The document WAW019 cites for the same finding in the aws lexicon, named
|
|
67
|
+
* without the em-dash its entry there carries (the docs prose lint counts them).
|
|
68
|
+
*/
|
|
69
|
+
const AWS_SECURITY_PILLAR: Authority = {
|
|
70
|
+
name: "AWS Well-Architected Framework, Security Pillar",
|
|
71
|
+
url: "https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html",
|
|
72
|
+
};
|
|
73
|
+
|
|
26
74
|
export const terraformAuditCatalog: Record<string, RuleMeta> = {
|
|
27
75
|
TF001: {
|
|
28
76
|
id: "TF001",
|
|
@@ -321,6 +369,188 @@ export const terraformAuditCatalog: Record<string, RuleMeta> = {
|
|
|
321
369
|
"pointed at whatever vault owns the credential, and rotate what was committed.",
|
|
322
370
|
yamlBased: false,
|
|
323
371
|
},
|
|
372
|
+
TF030: {
|
|
373
|
+
id: "TF030",
|
|
374
|
+
tier: "merge-worthy",
|
|
375
|
+
fixKind: "guidance",
|
|
376
|
+
category: "security",
|
|
377
|
+
title: "Security group rule allows unrestricted ingress on a sensitive port",
|
|
378
|
+
remediation:
|
|
379
|
+
"Restrict the CIDR on SSH, RDP, MySQL and PostgreSQL ports to the sources that need them, or reach " +
|
|
380
|
+
"the host through a bastion, a VPN or SSM Session Manager.",
|
|
381
|
+
authority: [AWS_SECURITY_PILLAR],
|
|
382
|
+
yamlBased: false,
|
|
383
|
+
},
|
|
384
|
+
TF031: {
|
|
385
|
+
id: "TF031",
|
|
386
|
+
tier: "merge-worthy",
|
|
387
|
+
fixKind: "guidance",
|
|
388
|
+
category: "security",
|
|
389
|
+
title: "IAM policy allows a wildcard Action or Resource",
|
|
390
|
+
remediation:
|
|
391
|
+
"Name the actions the workload calls and the ARNs it touches. For the few actions that accept only " +
|
|
392
|
+
'Resource "*" (`ecr:GetAuthorizationToken`, `sts:GetCallerIdentity`), keep that statement on its own and ' +
|
|
393
|
+
"suppress it with `# chant-ignore-block: TF031`. A policy TF031 reports as not determined is built from " +
|
|
394
|
+
"an expression; it is not a finding.",
|
|
395
|
+
authority: [AWS_IAM_LEAST_PRIVILEGE],
|
|
396
|
+
yamlBased: false,
|
|
397
|
+
},
|
|
398
|
+
TF032: {
|
|
399
|
+
id: "TF032",
|
|
400
|
+
tier: "merge-worthy",
|
|
401
|
+
fixKind: "guidance",
|
|
402
|
+
category: "security",
|
|
403
|
+
title: "ECS container definition passes a credential as a plaintext environment value",
|
|
404
|
+
remediation:
|
|
405
|
+
"Move the value from the container's `environment` to its `secrets`, with a `valueFrom` naming a " +
|
|
406
|
+
"Secrets Manager secret or SSM parameter, and rotate the committed value.",
|
|
407
|
+
authority: [ECS_SENSITIVE_DATA],
|
|
408
|
+
yamlBased: false,
|
|
409
|
+
},
|
|
410
|
+
TF033: {
|
|
411
|
+
id: "TF033",
|
|
412
|
+
tier: "merge-worthy",
|
|
413
|
+
fixKind: "guidance",
|
|
414
|
+
category: "security",
|
|
415
|
+
title: "RDS DB instance or cluster storage is not encrypted",
|
|
416
|
+
remediation:
|
|
417
|
+
"Set `storage_encrypted = true` (and `kms_key_id` for a customer managed key). An existing database cannot be " +
|
|
418
|
+
"encrypted in place: restore an encrypted copy of a snapshot. An Aurora cluster, or a database created from a " +
|
|
419
|
+
"snapshot or replica, is reported as not determined, not as a finding.",
|
|
420
|
+
authority: [AWS_RDS_ENCRYPTION],
|
|
421
|
+
yamlBased: false,
|
|
422
|
+
},
|
|
423
|
+
TF034: {
|
|
424
|
+
id: "TF034",
|
|
425
|
+
tier: "merge-worthy",
|
|
426
|
+
fixKind: "guidance",
|
|
427
|
+
category: "security",
|
|
428
|
+
title: "SNS topic has no server-side encryption",
|
|
429
|
+
remediation:
|
|
430
|
+
'Set `kms_master_key_id` to a customer managed KMS key, or to `"alias/aws/sns"` for the AWS managed one. No AWS ' +
|
|
431
|
+
"default encrypts a topic that names no key.",
|
|
432
|
+
authority: [AWS_SNS_SSE],
|
|
433
|
+
yamlBased: false,
|
|
434
|
+
},
|
|
435
|
+
TF035: {
|
|
436
|
+
id: "TF035",
|
|
437
|
+
tier: "merge-worthy",
|
|
438
|
+
fixKind: "guidance",
|
|
439
|
+
category: "security",
|
|
440
|
+
title: "SQS queue turns server-side encryption off",
|
|
441
|
+
remediation:
|
|
442
|
+
"Remove `sqs_managed_sse_enabled = false` (new queues are encrypted with SSE-SQS by default), set it to `true`, " +
|
|
443
|
+
"or set `kms_master_key_id`. A queue that sets neither attribute is encrypted and is not reported.",
|
|
444
|
+
authority: [AWS_SQS_SSE],
|
|
445
|
+
yamlBased: false,
|
|
446
|
+
},
|
|
447
|
+
TF036: {
|
|
448
|
+
id: "TF036",
|
|
449
|
+
tier: "merge-worthy",
|
|
450
|
+
fixKind: "guidance",
|
|
451
|
+
category: "security",
|
|
452
|
+
title: "EBS volume does not ask for encryption",
|
|
453
|
+
remediation:
|
|
454
|
+
"Set `encrypted = true` (and `kms_key_id` for a customer managed key). A volume that leaves `encrypted` unset " +
|
|
455
|
+
"depends on the Region's EBS encryption by default and is reported as not determined, not as a finding.",
|
|
456
|
+
authority: [AWS_EBS_ENCRYPTION],
|
|
457
|
+
yamlBased: false,
|
|
458
|
+
},
|
|
459
|
+
TF037: {
|
|
460
|
+
id: "TF037",
|
|
461
|
+
tier: "merge-worthy",
|
|
462
|
+
fixKind: "guidance",
|
|
463
|
+
category: "security",
|
|
464
|
+
title: "ECR repository allows mutable image tags",
|
|
465
|
+
remediation:
|
|
466
|
+
'Set `image_tag_mutability = "IMMUTABLE"`, or `"IMMUTABLE_WITH_EXCLUSION"` with an ' +
|
|
467
|
+
"`image_tag_mutability_exclusion_filter` naming the few moving tags (`latest`) that must stay mutable. The " +
|
|
468
|
+
"provider default is `MUTABLE`.",
|
|
469
|
+
authority: [AWS_ECR_TAG_IMMUTABILITY],
|
|
470
|
+
yamlBased: false,
|
|
471
|
+
},
|
|
472
|
+
TF038: {
|
|
473
|
+
id: "TF038",
|
|
474
|
+
tier: "merge-worthy",
|
|
475
|
+
fixKind: "guidance",
|
|
476
|
+
category: "correctness",
|
|
477
|
+
title: "OCI module source has no tag or digest, or a mutable tag",
|
|
478
|
+
remediation:
|
|
479
|
+
"Pin the `oci://` source with `?digest=sha256:...` (a digest cannot move) or an exact version tag " +
|
|
480
|
+
"(`?tag=1.4.0`). A source with no tag pulls `latest`.",
|
|
481
|
+
yamlBased: false,
|
|
482
|
+
},
|
|
483
|
+
TF039: {
|
|
484
|
+
id: "TF039",
|
|
485
|
+
tier: "report-only",
|
|
486
|
+
fixKind: "guidance",
|
|
487
|
+
category: "best-practice",
|
|
488
|
+
title: "Registry module version is a range, not an exact version",
|
|
489
|
+
remediation: 'Set an exact `version` (`version = "1.4.0"`) for projects that pin modules. Off by default.',
|
|
490
|
+
yamlBased: false,
|
|
491
|
+
},
|
|
492
|
+
TF040: {
|
|
493
|
+
id: "TF040",
|
|
494
|
+
tier: "report-only",
|
|
495
|
+
fixKind: "guidance",
|
|
496
|
+
category: "best-practice",
|
|
497
|
+
title: "Root has no committed .terraform.lock.hcl",
|
|
498
|
+
remediation:
|
|
499
|
+
"Run `terraform init` in the root and commit the `.terraform.lock.hcl` it writes. Off by default; " +
|
|
500
|
+
"checked only where the root's directory is known.",
|
|
501
|
+
yamlBased: false,
|
|
502
|
+
},
|
|
503
|
+
TF041: {
|
|
504
|
+
id: "TF041",
|
|
505
|
+
tier: "merge-worthy",
|
|
506
|
+
fixKind: "guidance",
|
|
507
|
+
category: "correctness",
|
|
508
|
+
title: "Terragrunt dependency lets mock_outputs stand in for apply",
|
|
509
|
+
remediation:
|
|
510
|
+
'Set `mock_outputs_allowed_terraform_commands = ["validate", "plan"]` on every `dependency` that sets `mock_outputs`. ' +
|
|
511
|
+
"Terragrunt reads a missing or empty list as every command, apply included.",
|
|
512
|
+
yamlBased: false,
|
|
513
|
+
},
|
|
514
|
+
TF042: {
|
|
515
|
+
id: "TF042",
|
|
516
|
+
tier: "merge-worthy",
|
|
517
|
+
fixKind: "guidance",
|
|
518
|
+
category: "correctness",
|
|
519
|
+
title: "Terragrunt dependency sets skip_outputs together with mock_outputs",
|
|
520
|
+
remediation:
|
|
521
|
+
"Drop `skip_outputs`, or pass the values as `inputs`. With `skip_outputs = true` the upstream outputs are never read, so every run uses the mocks.",
|
|
522
|
+
yamlBased: false,
|
|
523
|
+
},
|
|
524
|
+
TF043: {
|
|
525
|
+
id: "TF043",
|
|
526
|
+
tier: "merge-worthy",
|
|
527
|
+
fixKind: "guidance",
|
|
528
|
+
category: "correctness",
|
|
529
|
+
title: "Terragrunt terraform.source names no version (git ref, tfr version or oci tag)",
|
|
530
|
+
remediation:
|
|
531
|
+
"Pin the source: `?ref=` for git, `?version=` for `tfr://`, `?digest=` or `?tag=` for `oci://`.",
|
|
532
|
+
yamlBased: false,
|
|
533
|
+
},
|
|
534
|
+
TF044: {
|
|
535
|
+
id: "TF044",
|
|
536
|
+
tier: "merge-worthy",
|
|
537
|
+
fixKind: "guidance",
|
|
538
|
+
category: "correctness",
|
|
539
|
+
title: "Terragrunt config keeps state in a local backend",
|
|
540
|
+
remediation:
|
|
541
|
+
'Use a shared backend (S3, GCS) in `remote_state`. State written by `backend = "local"` stays on the runner and is lost with it.',
|
|
542
|
+
yamlBased: false,
|
|
543
|
+
},
|
|
544
|
+
TF045: {
|
|
545
|
+
id: "TF045",
|
|
546
|
+
tier: "report-only",
|
|
547
|
+
fixKind: "guidance",
|
|
548
|
+
category: "best-practice",
|
|
549
|
+
title: "No Terragrunt config sets terragrunt_version_constraint",
|
|
550
|
+
remediation:
|
|
551
|
+
'Set `terragrunt_version_constraint = ">= 1.1.0"` in the root config. Off by default; judged only across the configs scanned.',
|
|
552
|
+
yamlBased: false,
|
|
553
|
+
},
|
|
324
554
|
};
|
|
325
555
|
|
|
326
556
|
// Prior art credits, if any, live beside the rules in ./audit-lineage.ts (see
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* | `tflint-ruleset-redeploy` | tflint-ruleset-redeploy | https://github.com/RedeployAB/tflint-ruleset-redeploy | 0BSD | scanner | Community ruleset; richest source of language-level rules outside the official set. Sweep: indexed from `docs/rules/README.md`, same table shape (33 rules). |
|
|
57
57
|
* | `tflint-ruleset-avm` | tflint-ruleset-avm | https://github.com/Azure/tflint-ruleset-avm | MIT | scanner | Azure Verified Modules conformance; two of its 33 rules are provider-agnostic. Sweep: indexed from the repository-root `RULES.md`, since `docs/` holds pages for only two rules (33 rules). |
|
|
58
58
|
* | `tfsec` | tfsec | https://github.com/aquasecurity/tfsec | MIT | scanner | Historical: not archived but effectively frozen (no release since 2025-05); its docs site 404s above v0.61.x, so cite pinned repository paths (`github.com/aquasecurity/tfsec/blob/master/docs/checks/...`), not the docs site. Sweep: indexed from the root `rules.md` on `master`, a flat table of all 152 check ids, because `docs/checks` nests a directory per provider, service and check. |
|
|
59
|
-
* | `trivy-checks` | trivy-checks | https://github.com/aquasecurity/trivy-checks | MIT (not the trivy scanner's own Apache-2.0; cite the checks repo's licence, not the engine's) | scanner | Where tfsec's rules live today (tfsec -> defsec -> trivy + trivy-checks). Cite rules by `long_id` (stable, human-readable); `AVD-*` ids are aliases now. Sweep:
|
|
59
|
+
* | `trivy-checks` | trivy-checks | https://github.com/aquasecurity/trivy-checks | MIT (not the trivy scanner's own Apache-2.0; cite the checks repo's licence, not the engine's) | scanner | Where tfsec's rules live today (tfsec -> defsec -> trivy + trivy-checks). Cite rules by `long_id` (stable, human-readable); `AVD-*` ids are aliases now. Sweep: registered in `PRIOR_ART` since TF030 (#2285) cited `aws-ec2-no-public-ingress-sgr` (TF032 also cites `aws-ecs-no-plaintext-secrets`, AWS-0036), but not swept: its `long_id`s live in Rego metadata under `checks/<kind>/<provider>/<service>/`, with no flat index. Check a cited id is live: TF031's counterpart, `aws-iam-no-policy-wildcards`, is a `deprecated: true` stub with no rule body, so TF031 does not cite it. |
|
|
60
60
|
* | `terraform-sentinel-policies` | HashiCorp reference Sentinel policies | https://github.com/hashicorp/terraform-sentinel-policies | MPL-2.0 | specification | HashiCorp's own example policy set; ships zero rules baked into HCP Terraform itself, so treat a cited policy as a documented pattern (`specification`) unless a future entry runs it as a real check (`scanner`); the `kind` union allows either. Sweep: indexed by listing the five per-cloud directories, whose `.sentinel` filenames are the policy ids credits cite (73 policies); the repository publishes no index page. |
|
|
61
61
|
* | `choudoufu` | choudoufu | https://github.com/INTENTIUS/choudoufu | MPL-2.0 | scanner | Its `internal/live/lint` package; experimental, AWS-only. Sweep: unsweepable, its rule ids are Go constants in `internal/live/lint/issue.go` and it publishes no rule index. |
|
|
62
62
|
* | `hashicorp-style-guide` | HashiCorp Terraform style guide | https://developer.hashicorp.com/terraform/language/style | n/a | specification | Sweep: unsweepable, one prose page of recommendations with no rule ids; a credit quotes the sentence and links its fragment. |
|
|
@@ -401,4 +401,158 @@ export const terraformAuditLineage: Record<string, Lineage[]> = {
|
|
|
401
401
|
},
|
|
402
402
|
{ tool: "kics", rule: "a88baa34-e2ad-44ea-ad6f-8cac87bc7c71", url: "https://docs.kics.io/latest/secrets/", relation: "overlaps" },
|
|
403
403
|
],
|
|
404
|
+
TF030: [
|
|
405
|
+
// Every credit overlaps; none is equivalent. TF030 is WAW019's port list
|
|
406
|
+
// (22, 3389, 3306, 5432) on 0.0.0.0/0 or ::/0, read across the three
|
|
407
|
+
// Terraform shapes. Checkov checks one port per id and, unlike TF030,
|
|
408
|
+
// reads tcp 0-0 as every port and passes any rule with `self = true`.
|
|
409
|
+
// tfsec flags a /0 on any port; trivy-checks only SSH and RDP; KICS a
|
|
410
|
+
// longer port list; the Sentinel policies only `aws_security_group_rule`
|
|
411
|
+
// with an exact `to_port`. Each upstream id was read from its source on
|
|
412
|
+
// 2026-10-02 (checkov `AbsSecurityGroupUnrestrictedIngress.py`, trivy-checks
|
|
413
|
+
// `no_public_ingress_sgr.rego` metadata, KICS `metadata.json`, tfsec
|
|
414
|
+
// `rules.md`).
|
|
415
|
+
{ tool: "checkov", rule: "CKV_AWS_24", url: "https://www.checkov.io/5.Policy%20Index/terraform.html", relation: "overlaps" },
|
|
416
|
+
{ tool: "checkov", rule: "CKV_AWS_25", url: "https://www.checkov.io/5.Policy%20Index/terraform.html", relation: "overlaps" },
|
|
417
|
+
{
|
|
418
|
+
tool: "tfsec",
|
|
419
|
+
rule: "aws-vpc-no-public-ingress-sgr",
|
|
420
|
+
url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/vpc/no-public-ingress-sgr/index.md",
|
|
421
|
+
relation: "overlaps",
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
tool: "trivy-checks",
|
|
425
|
+
rule: "aws-ec2-no-public-ingress-sgr",
|
|
426
|
+
url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/ec2/no_public_ingress_sgr.rego",
|
|
427
|
+
relation: "overlaps",
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
tool: "kics",
|
|
431
|
+
rule: "381c3f2a-ef6f-4eff-99f7-b169cda3422c",
|
|
432
|
+
url: "https://docs.kics.io/latest/queries/terraform-queries/aws/381c3f2a-ef6f-4eff-99f7-b169cda3422c/",
|
|
433
|
+
relation: "overlaps",
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
tool: "terraform-sentinel-policies",
|
|
437
|
+
rule: "restrict-ingress-sg-rule-ssh",
|
|
438
|
+
url: "https://github.com/hashicorp/terraform-sentinel-policies/blob/main/aws/restrict-ingress-sg-rule-ssh.sentinel",
|
|
439
|
+
relation: "overlaps",
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
tool: "terraform-sentinel-policies",
|
|
443
|
+
rule: "restrict-ingress-sg-rule-rdp",
|
|
444
|
+
url: "https://github.com/hashicorp/terraform-sentinel-policies/blob/main/aws/restrict-ingress-sg-rule-rdp.sentinel",
|
|
445
|
+
relation: "overlaps",
|
|
446
|
+
},
|
|
447
|
+
],
|
|
448
|
+
// tfsec's check also flags a service wildcard (`s3:*`), which TF031 does
|
|
449
|
+
// not, so "overlaps". checkov splits the condition four ways: CKV_AWS_63
|
|
450
|
+
// (Action "*" on the policy resources, plus aws_ssoadmin_permission_set_
|
|
451
|
+
// inline_policy, which TF031 does not read) and CKV_AWS_49 (the same on the
|
|
452
|
+
// data source, which TF031 extends with Resource "*"); CKV_AWS_355/356 ask
|
|
453
|
+
// cloudsplaining whether Resource "*" meets a RESTRICTABLE action, a
|
|
454
|
+
// narrower test than TF031's literal one. trivy-checks has no credit:
|
|
455
|
+
// `aws-iam-no-policy-wildcards` (AWS-0057) survives there only as a
|
|
456
|
+
// `deprecated: true` metadata stub with no rule body, added by
|
|
457
|
+
// aquasecurity/trivy-checks c292eb6737e0 ("add removed Go checks as
|
|
458
|
+
// deprecated"), so it checks nothing to be equivalent to (#2286).
|
|
459
|
+
TF031: [
|
|
460
|
+
{
|
|
461
|
+
tool: "tfsec",
|
|
462
|
+
rule: "aws-iam-no-policy-wildcards",
|
|
463
|
+
url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/iam/no-policy-wildcards/index.md",
|
|
464
|
+
relation: "overlaps",
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
tool: "checkov",
|
|
468
|
+
rule: "CKV_AWS_63",
|
|
469
|
+
url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/IAMStarActionPolicyDocument.py",
|
|
470
|
+
relation: "overlaps",
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
tool: "checkov",
|
|
474
|
+
rule: "CKV_AWS_49",
|
|
475
|
+
url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/data/aws/StarActionPolicyDocument.py",
|
|
476
|
+
relation: "extends",
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
tool: "checkov",
|
|
480
|
+
rule: "CKV_AWS_355",
|
|
481
|
+
url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/IAMStarResourcePolicyDocument.py",
|
|
482
|
+
relation: "overlaps",
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
tool: "checkov",
|
|
486
|
+
rule: "CKV_AWS_356",
|
|
487
|
+
url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/data/aws/ResourcePolicyDocument.py",
|
|
488
|
+
relation: "overlaps",
|
|
489
|
+
},
|
|
490
|
+
],
|
|
491
|
+
// tfsec's `aws-ecs-no-plaintext-secrets` and its successor in trivy-checks
|
|
492
|
+
// (`long_id` aws-ecs-no-plaintext-secrets, AVD-AWS-0036) fire on the same
|
|
493
|
+
// condition: an environment entry whose name is sensitive or whose value a
|
|
494
|
+
// secret scanner flags. `overlaps`, not `equivalent`, because both evaluate
|
|
495
|
+
// the definition first and so also read what TF032 reports as not
|
|
496
|
+
// determined, and their name list differs from secret-shape.ts's. Checkov
|
|
497
|
+
// has no Terraform check for ECS environment values (its ECS checks cover
|
|
498
|
+
// privilege, read-only root, host process, task role and EFS encryption,
|
|
499
|
+
// `checkov/terraform/checks/resource/aws/ECS*.py`), so it gets no credit.
|
|
500
|
+
TF032: [
|
|
501
|
+
{
|
|
502
|
+
tool: "tfsec",
|
|
503
|
+
rule: "aws-ecs-no-plaintext-secrets",
|
|
504
|
+
url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/ecs/no-plaintext-secrets/index.md",
|
|
505
|
+
relation: "overlaps",
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
tool: "trivy-checks",
|
|
509
|
+
rule: "aws-ecs-no-plaintext-secrets",
|
|
510
|
+
url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/ecs/no_plaintext_secrets.rego",
|
|
511
|
+
relation: "overlaps",
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
// TF033-TF037 (#2288). Every tool below reports an absent attribute the
|
|
515
|
+
// same as an insecure one, which is right for SNS (TF034) and ECR (TF037)
|
|
516
|
+
// and wrong for the rest: SQS encrypts new queues by default, an unset
|
|
517
|
+
// EBS `encrypted` follows the Region's encryption by default, and Aurora
|
|
518
|
+
// encrypts new clusters whatever `storage_encrypted` says. Where chant's
|
|
519
|
+
// answer to absence differs the credit is "overlaps"; where it agrees and
|
|
520
|
+
// the condition is the same, "equivalent". The ECR credits are "overlaps"
|
|
521
|
+
// too: none of them knows provider v6's `IMMUTABLE_WITH_EXCLUSION`, which
|
|
522
|
+
// TF037 passes and they report. trivy-checks ids are the live
|
|
523
|
+
// Rego checks (not `deprecated` stubs) at aquasecurity/trivy-checks
|
|
524
|
+
// 71c05d02845c. tfsec has no TF036 credit: its frozen `rules.md`, which
|
|
525
|
+
// the prior-art sweep indexes, no longer lists an EBS volume check.
|
|
526
|
+
TF033: [
|
|
527
|
+
{ tool: "tfsec", rule: "aws-rds-encrypt-instance-storage-data", url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/rds/encrypt-instance-storage-data/index.md", relation: "overlaps" },
|
|
528
|
+
{ tool: "tfsec", rule: "aws-rds-encrypt-cluster-storage-data", url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/rds/encrypt-cluster-storage-data/index.md", relation: "overlaps" },
|
|
529
|
+
{ tool: "trivy-checks", rule: "aws-rds-encrypt-instance-storage-data", url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/rds/encrypt_instance_storage_data.rego", relation: "overlaps" },
|
|
530
|
+
{ tool: "trivy-checks", rule: "aws-rds-encrypt-cluster-storage-data", url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/rds/encrypt_cluster_storage_data.rego", relation: "overlaps" },
|
|
531
|
+
{ tool: "checkov", rule: "CKV_AWS_16", url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/RDSEncryption.py", relation: "overlaps" },
|
|
532
|
+
{ tool: "checkov", rule: "CKV_AWS_96", url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/AuroraEncryption.py", relation: "overlaps" },
|
|
533
|
+
{ tool: "kics", rule: "08bd0760-8752-44e1-9779-7bb369b2b4e4", url: "https://docs.kics.io/latest/queries/terraform-queries/aws/08bd0760-8752-44e1-9779-7bb369b2b4e4/", relation: "overlaps" },
|
|
534
|
+
],
|
|
535
|
+
TF034: [
|
|
536
|
+
{ tool: "tfsec", rule: "aws-sns-enable-topic-encryption", url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/sns/enable-topic-encryption/index.md", relation: "equivalent" },
|
|
537
|
+
{ tool: "trivy-checks", rule: "aws-sns-enable-topic-encryption", url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/sns/enable_topic_encryption.rego", relation: "equivalent" },
|
|
538
|
+
{ tool: "checkov", rule: "CKV_AWS_26", url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/SNSTopicEncryption.py", relation: "equivalent" },
|
|
539
|
+
{ tool: "kics", rule: "28545147-2fc6-42d5-a1f9-cf226658e591", url: "https://docs.kics.io/latest/queries/terraform-queries/aws/28545147-2fc6-42d5-a1f9-cf226658e591/", relation: "equivalent" },
|
|
540
|
+
],
|
|
541
|
+
TF035: [
|
|
542
|
+
{ tool: "tfsec", rule: "aws-sqs-enable-queue-encryption", url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/sqs/enable-queue-encryption/index.md", relation: "overlaps" },
|
|
543
|
+
{ tool: "trivy-checks", rule: "aws-sqs-enable-queue-encryption", url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/sqs/enable_queue_encryption.rego", relation: "overlaps" },
|
|
544
|
+
{ tool: "checkov", rule: "CKV_AWS_27", url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/SQSQueueEncryption.py", relation: "overlaps" },
|
|
545
|
+
{ tool: "kics", rule: "6e8849c1-3aa7-40e3-9063-b85ee300f29f", url: "https://docs.kics.io/latest/queries/terraform-queries/aws/6e8849c1-3aa7-40e3-9063-b85ee300f29f/", relation: "overlaps" },
|
|
546
|
+
],
|
|
547
|
+
TF036: [
|
|
548
|
+
{ tool: "trivy-checks", rule: "aws-ec2-enable-volume-encryption", url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/ec2/enable_volume_encryption.rego", relation: "overlaps" },
|
|
549
|
+
{ tool: "checkov", rule: "CKV_AWS_3", url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/EBSEncryption.py", relation: "overlaps" },
|
|
550
|
+
{ tool: "kics", rule: "cc997676-481b-4e93-aa81-d19f8c5e9b12", url: "https://docs.kics.io/latest/queries/terraform-queries/aws/cc997676-481b-4e93-aa81-d19f8c5e9b12/", relation: "overlaps" },
|
|
551
|
+
],
|
|
552
|
+
TF037: [
|
|
553
|
+
{ tool: "tfsec", rule: "aws-ecr-enforce-immutable-repository", url: "https://github.com/aquasecurity/tfsec/blob/master/docs/checks/aws/ecr/enforce-immutable-repository/index.md", relation: "overlaps" },
|
|
554
|
+
{ tool: "trivy-checks", rule: "aws-ecr-enforce-immutable-repository", url: "https://github.com/aquasecurity/trivy-checks/blob/main/checks/cloud/aws/ecr/enforce_immutable_repository.rego", relation: "overlaps" },
|
|
555
|
+
{ tool: "checkov", rule: "CKV_AWS_51", url: "https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/ECRImmutableTags.py", relation: "overlaps" },
|
|
556
|
+
{ tool: "kics", rule: "d1846b12-20c5-4d45-8798-fc35b79268eb", url: "https://docs.kics.io/latest/queries/terraform-queries/aws/d1846b12-20c5-4d45-8798-fc35b79268eb/", relation: "overlaps" },
|
|
557
|
+
],
|
|
404
558
|
};
|
package/src/lint/audit.test.ts
CHANGED
|
@@ -208,7 +208,9 @@ describe("every fixture root gets the same verdict from chant audit as from chan
|
|
|
208
208
|
entities,
|
|
209
209
|
buildResult: { outputs: new Map(), entities, warnings, errors: [], sourceFileCount: entities.size },
|
|
210
210
|
} as unknown as PostSynthContext;
|
|
211
|
-
|
|
211
|
+
// An `auditOptIn` check (TF040, #3190) is the one place the audit is meant to
|
|
212
|
+
// differ from the unfiltered build: it needs `lint.rules` there.
|
|
213
|
+
return verdictOf((terraformPlugin.postSynthChecks?.() ?? []).filter((check) => !check.auditOptIn).flatMap((check) => check.check(ctx)));
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
async function auditVerdict(dir: string): Promise<string[]> {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { describe, expect, test } from "vitest";
|
|
4
|
+
import { auditFiles, type AuditFinding, type ChecksProvider, type EntitiesProvider } from "@intentius/chant/audit/core";
|
|
5
|
+
import { discoverByDetection, type DetectPlugin } from "@intentius/chant/audit/discover";
|
|
6
|
+
import { terraformPlugin } from "../../plugin";
|
|
7
|
+
import { postSynthChecks } from "./index";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Epic #2284's definition of done, run through `chant audit`'s terraform path
|
|
11
|
+
* (real discovery, the plugin's `auditEntities` parse, every post-synth check
|
|
12
|
+
* in the barrel) over the two estate roots in `fixtures/estate-2284/`. The
|
|
13
|
+
* violating root holds one violation per rule, TF030 to TF037; the clean root
|
|
14
|
+
* holds the same estate fixed, with the provider-default cases (an SQS queue
|
|
15
|
+
* with no encryption attribute, an EBS volume behind an enabled
|
|
16
|
+
* `aws_ebs_encryption_by_default`) left as real estates leave them.
|
|
17
|
+
*/
|
|
18
|
+
const estate = join(dirname(fileURLToPath(import.meta.url)), "fixtures", "estate-2284");
|
|
19
|
+
|
|
20
|
+
const terraformDetectPlugin: DetectPlugin = { name: "terraform" };
|
|
21
|
+
const checksProvider: ChecksProvider = async (lexicon) =>
|
|
22
|
+
lexicon === "terraform" ? (terraformPlugin.postSynthChecks?.() ?? []) : [];
|
|
23
|
+
const entitiesProvider: EntitiesProvider = async (lexicon) =>
|
|
24
|
+
lexicon === "terraform" ? terraformPlugin.auditEntities?.bind(terraformPlugin) : undefined;
|
|
25
|
+
|
|
26
|
+
async function audit(root: "violating" | "clean"): Promise<AuditFinding[]> {
|
|
27
|
+
return auditFiles(discoverByDetection(join(estate, root), [terraformDetectPlugin]), { checksProvider, entitiesProvider });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** The rule each violating resource is written for. */
|
|
31
|
+
const EXPECTED: Record<string, string> = {
|
|
32
|
+
TF030: "aws_security_group.bastion",
|
|
33
|
+
TF031: "aws_iam_policy.deployer",
|
|
34
|
+
TF032: "aws_ecs_task_definition.api",
|
|
35
|
+
TF033: "aws_db_instance.ledger",
|
|
36
|
+
TF034: "aws_sns_topic.alerts",
|
|
37
|
+
TF035: "aws_sqs_queue.settlements",
|
|
38
|
+
TF036: "aws_ebs_volume.scratch",
|
|
39
|
+
TF037: "aws_ecr_repository.api",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const FAMILY = /^TF03[0-7]$/;
|
|
43
|
+
|
|
44
|
+
describe("epic #2284 acceptance: chant audit over the estate roots", () => {
|
|
45
|
+
test("every rule TF030 to TF037 is in the barrel", () => {
|
|
46
|
+
const shipped = new Set(postSynthChecks.map((c) => c.id));
|
|
47
|
+
expect(Object.keys(EXPECTED).filter((id) => !shipped.has(id))).toEqual([]);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
for (const [id, address] of Object.entries(EXPECTED)) {
|
|
51
|
+
test(`the violating root reports ${id} on ${address}`, async () => {
|
|
52
|
+
const findings = (await audit("violating")).filter((f) => f.checkId === id);
|
|
53
|
+
expect(findings.map((f) => f.entity)).toEqual([`audit-root/${address}`]);
|
|
54
|
+
expect(["error", "warning"]).toContain(findings[0]!.severity);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
test("the violating root reports nothing TF030 to TF037 cannot prove", async () => {
|
|
59
|
+
const family = (await audit("violating")).filter((f) => FAMILY.test(f.checkId));
|
|
60
|
+
expect(family.filter((f) => f.severity === "info")).toEqual([]);
|
|
61
|
+
expect(family.map((f) => f.checkId).sort()).toEqual(Object.keys(EXPECTED));
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test("the clean root, provider-default cases included, reports nothing from TF030 to TF037", async () => {
|
|
65
|
+
const family = (await audit("clean")).filter((f) => FAMILY.test(f.checkId));
|
|
66
|
+
expect(family).toEqual([]);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Vendored for TF030 from https://github.com/aws-samples/aws-cloudwan-workshop-code
|
|
2
|
+
# Path: terraform/modules/compute/main.tf
|
|
3
|
+
# Commit: 1a331e8782b6cccdc5d0bb4ed28c45594445cc2f
|
|
4
|
+
# Licence: MIT-0, https://github.com/aws-samples/aws-cloudwan-workshop-code/blob/1a331e8782b6cccdc5d0bb4ed28c45594445cc2f/LICENSE
|
|
5
|
+
# Excerpt: lines 1-37, unmodified.
|
|
6
|
+
#
|
|
7
|
+
# TF030: silent. A group with no ingress at all (closed, not unknown), ICMP from 0.0.0.0/0 (no ports), SSH from a referenced security group rather than a CIDR, and an all-traffic egress rule.
|
|
8
|
+
|
|
9
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
10
|
+
# SPDX-License-Identifier: MIT-0
|
|
11
|
+
|
|
12
|
+
# --- modules/compute/main.tf ---
|
|
13
|
+
|
|
14
|
+
# ---------- EC2 INSTANCES ----------
|
|
15
|
+
# Security Group
|
|
16
|
+
resource "aws_security_group" "instance_sg" {
|
|
17
|
+
name = "${var.vpc_name}-instance-security-group-${var.project_name}"
|
|
18
|
+
description = "EC2 Instance Security Group"
|
|
19
|
+
vpc_id = var.vpc_information.vpc_attributes.id
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
resource "aws_vpc_security_group_ingress_rule" "allowing_ingress_icmp" {
|
|
23
|
+
security_group_id = aws_security_group.instance_sg.id
|
|
24
|
+
|
|
25
|
+
from_port = -1
|
|
26
|
+
to_port = -1
|
|
27
|
+
ip_protocol = "icmp"
|
|
28
|
+
cidr_ipv4 = "0.0.0.0/0"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
resource "aws_vpc_security_group_ingress_rule" "allowing_ingress_eic" {
|
|
32
|
+
security_group_id = aws_security_group.instance_sg.id
|
|
33
|
+
|
|
34
|
+
from_port = 22
|
|
35
|
+
to_port = 22
|
|
36
|
+
ip_protocol = "tcp"
|
|
37
|
+
referenced_security_group_id = aws_security_group.eic_sg.id
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
resource "aws_vpc_security_group_egress_rule" "allowing_egress_any" {
|
|
41
|
+
security_group_id = aws_security_group.instance_sg.id
|
|
42
|
+
|
|
43
|
+
ip_protocol = "-1"
|
|
44
|
+
cidr_ipv4 = "0.0.0.0/0"
|
|
45
|
+
}
|