@intentius/chant-lexicon-terraform 0.124.52 → 0.124.55
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/README.md +14 -10
- package/dist/__fixtures__/pr-loop/estate.component.d.ts +7 -0
- package/dist/__fixtures__/pr-loop/estate.component.d.ts.map +1 -0
- package/dist/__fixtures__/pr-loop/estate.component.js +7 -0
- package/dist/__fixtures__/report/generate.d.ts +26 -0
- package/dist/__fixtures__/report/generate.d.ts.map +1 -0
- package/dist/__fixtures__/report/generate.js +58 -0
- package/dist/applied-state.d.ts +27 -0
- package/dist/applied-state.d.ts.map +1 -0
- package/dist/applied-state.js +44 -0
- package/dist/backend-config.d.ts +53 -0
- package/dist/backend-config.d.ts.map +1 -0
- package/dist/backend-config.js +136 -0
- package/dist/behaviour/kinds.d.ts.map +1 -1
- package/dist/behaviour/kinds.js +4 -0
- package/dist/behaviour/predict.d.ts.map +1 -1
- package/dist/behaviour/predict.js +6 -2
- package/dist/behaviour/reference-catalog.d.ts +16 -5
- package/dist/behaviour/reference-catalog.d.ts.map +1 -1
- package/dist/behaviour/reference-catalog.js +16 -5
- package/dist/behaviour/request.d.ts.map +1 -1
- package/dist/behaviour/request.js +3 -2
- package/dist/changed-roots.d.ts +6 -4
- package/dist/changed-roots.d.ts.map +1 -1
- package/dist/changed-roots.js +14 -18
- package/dist/ci-setup.d.ts +11 -0
- package/dist/ci-setup.d.ts.map +1 -0
- package/dist/ci-setup.js +41 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +4 -3
- package/dist/components/capability-plugin.d.ts +105 -9
- package/dist/components/capability-plugin.d.ts.map +1 -1
- package/dist/components/capability-plugin.js +357 -36
- package/dist/components/compose-group.d.ts +145 -0
- package/dist/components/compose-group.d.ts.map +1 -0
- package/dist/components/compose-group.js +407 -0
- package/dist/components/placeholder-preview.d.ts +78 -0
- package/dist/components/placeholder-preview.d.ts.map +1 -0
- package/dist/components/placeholder-preview.js +254 -0
- package/dist/components/release-inputs.d.ts +29 -0
- package/dist/components/release-inputs.d.ts.map +1 -0
- package/dist/components/release-inputs.js +57 -0
- package/dist/components/trace-facts.d.ts +16 -0
- package/dist/components/trace-facts.d.ts.map +1 -0
- package/dist/components/trace-facts.js +19 -0
- package/dist/compose/apply-events.d.ts +46 -0
- package/dist/compose/apply-events.d.ts.map +1 -0
- package/dist/compose/apply-events.js +77 -0
- package/dist/compose/estate.d.ts +194 -0
- package/dist/compose/estate.d.ts.map +1 -0
- package/dist/compose/estate.js +363 -0
- package/dist/compose/hcl.d.ts +99 -0
- package/dist/compose/hcl.d.ts.map +1 -0
- package/dist/compose/hcl.js +302 -0
- package/dist/compose/module-address.d.ts +24 -0
- package/dist/compose/module-address.d.ts.map +1 -0
- package/dist/compose/module-address.js +43 -0
- package/dist/compose/root.d.ts +127 -0
- package/dist/compose/root.d.ts.map +1 -0
- package/dist/compose/root.js +586 -0
- package/dist/compose/run.d.ts +183 -0
- package/dist/compose/run.d.ts.map +1 -0
- package/dist/compose/run.js +447 -0
- package/dist/compose/slice.d.ts +102 -0
- package/dist/compose/slice.d.ts.map +1 -0
- package/dist/compose/slice.js +249 -0
- package/dist/compose/state-address.d.ts +28 -0
- package/dist/compose/state-address.d.ts.map +1 -0
- package/dist/compose/state-address.js +154 -0
- package/dist/compose/state-merge.d.ts +52 -0
- package/dist/compose/state-merge.d.ts.map +1 -0
- package/dist/compose/state-merge.js +135 -0
- package/dist/compose.d.ts +179 -0
- package/dist/compose.d.ts.map +1 -0
- package/dist/compose.js +482 -0
- package/dist/composites/terraform-apply-op.d.ts.map +1 -1
- package/dist/composites/terraform-apply-op.js +7 -3
- package/dist/cone.d.ts +53 -0
- package/dist/cone.d.ts.map +1 -0
- package/dist/cone.js +119 -0
- package/dist/config.d.ts +59 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +43 -9
- package/dist/cost-hold.d.ts +27 -0
- package/dist/cost-hold.d.ts.map +1 -0
- package/dist/cost-hold.js +21 -0
- package/dist/describe-resources.d.ts +74 -12
- package/dist/describe-resources.d.ts.map +1 -1
- package/dist/describe-resources.js +374 -66
- package/dist/drift-read.d.ts +33 -0
- package/dist/drift-read.d.ts.map +1 -0
- package/dist/drift-read.js +243 -0
- package/dist/drift-record.d.ts +147 -0
- package/dist/drift-record.d.ts.map +1 -0
- package/dist/drift-record.js +383 -0
- package/dist/drift-rows.d.ts +61 -0
- package/dist/drift-rows.d.ts.map +1 -0
- package/dist/drift-rows.js +108 -0
- package/dist/exit-codes.d.ts +55 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +48 -0
- package/dist/hcl/edges.d.ts.map +1 -1
- package/dist/hcl/edges.js +24 -1
- package/dist/hcl/files.d.ts +61 -0
- package/dist/hcl/files.d.ts.map +1 -0
- package/dist/hcl/files.js +221 -0
- package/dist/hcl/instances.d.ts +82 -0
- package/dist/hcl/instances.d.ts.map +1 -0
- package/dist/hcl/instances.js +390 -0
- package/dist/hcl/parse.d.ts +81 -9
- package/dist/hcl/parse.d.ts.map +1 -1
- package/dist/hcl/parse.js +114 -16
- package/dist/hcl/roots.d.ts.map +1 -1
- package/dist/hcl/roots.js +5 -0
- package/dist/hcl/suppressions.d.ts.map +1 -1
- package/dist/hcl/suppressions.js +8 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -2
- package/dist/integrity.json +8 -5
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/audit-catalog.js +27 -3
- package/dist/lint/audit-lineage.d.ts +14 -2
- package/dist/lint/audit-lineage.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/index.js +4 -0
- package/dist/lint/post-synth/record-store.d.ts +54 -0
- package/dist/lint/post-synth/record-store.d.ts.map +1 -0
- package/dist/lint/post-synth/record-store.js +104 -0
- package/dist/lint/post-synth/tf001.d.ts +2 -2
- package/dist/lint/post-synth/tf001.js +2 -2
- package/dist/lint/post-synth/tf024.d.ts +35 -11
- package/dist/lint/post-synth/tf024.d.ts.map +1 -1
- package/dist/lint/post-synth/tf024.js +92 -20
- package/dist/lint/post-synth/tf046.d.ts +64 -0
- package/dist/lint/post-synth/tf046.d.ts.map +1 -0
- package/dist/lint/post-synth/tf046.js +175 -0
- package/dist/lint/post-synth/tf047.d.ts +36 -0
- package/dist/lint/post-synth/tf047.d.ts.map +1 -0
- package/dist/lint/post-synth/tf047.js +94 -0
- package/dist/live-plan-reasons.d.ts +21 -0
- package/dist/live-plan-reasons.d.ts.map +1 -0
- package/dist/live-plan-reasons.js +47 -0
- package/dist/lock-rows.d.ts +36 -0
- package/dist/lock-rows.d.ts.map +1 -0
- package/dist/lock-rows.js +60 -0
- package/dist/lock-timeout.d.ts +22 -0
- package/dist/lock-timeout.d.ts.map +1 -0
- package/dist/lock-timeout.js +32 -0
- package/dist/lsp/option-keys.d.ts.map +1 -1
- package/dist/lsp/option-keys.js +2 -0
- package/dist/manifest.json +1 -1
- package/dist/module-catalog/index.d.ts +69 -0
- package/dist/module-catalog/index.d.ts.map +1 -0
- package/dist/module-catalog/index.js +110 -0
- package/dist/module-catalog/refresh-cli.d.ts +4 -0
- package/dist/module-catalog/refresh-cli.d.ts.map +1 -0
- package/dist/module-catalog/refresh-cli.js +64 -0
- package/dist/module-catalog/static-tier.d.ts +6 -0
- package/dist/module-catalog/static-tier.d.ts.map +1 -0
- package/dist/module-catalog/static-tier.js +1650 -0
- package/dist/module-catalog/types.d.ts +65 -0
- package/dist/module-catalog/types.d.ts.map +1 -0
- package/dist/module-catalog/types.js +33 -0
- package/dist/okf/index.md +3 -1
- package/dist/okf/rules/TF024.md +2 -2
- package/dist/okf/rules/TF046.md +11 -0
- package/dist/okf/rules/TF047.md +11 -0
- package/dist/op/activities/index.d.ts +6 -2
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/index.js +5 -1
- package/dist/op/activities/live-detect.d.ts +4 -3
- package/dist/op/activities/live-detect.d.ts.map +1 -1
- package/dist/op/activities/live-detect.js +57 -32
- package/dist/op/activities/pin-rollout.d.ts +2 -0
- package/dist/op/activities/pin-rollout.d.ts.map +1 -1
- package/dist/op/activities/pin-rollout.js +1 -0
- package/dist/op/activities/terraform.d.ts +182 -5
- package/dist/op/activities/terraform.d.ts.map +1 -1
- package/dist/op/activities/terraform.js +224 -24
- package/dist/op/activity-contracts.d.ts +27 -0
- package/dist/op/activity-contracts.d.ts.map +1 -1
- package/dist/op/activity-contracts.js +19 -1
- package/dist/op/builders.d.ts +7 -1
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/builders.js +9 -0
- package/dist/pin/consumers.d.ts +35 -0
- package/dist/pin/consumers.d.ts.map +1 -0
- package/dist/pin/consumers.js +70 -0
- package/dist/pin/edit.d.ts.map +1 -1
- package/dist/pin/edit.js +35 -0
- package/dist/pin/rollout.d.ts +2 -0
- package/dist/pin/rollout.d.ts.map +1 -1
- package/dist/pin/rollout.js +14 -11
- package/dist/plan-shape.d.ts +30 -0
- package/dist/plan-shape.d.ts.map +1 -0
- package/dist/plan-shape.js +125 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +37 -18
- package/dist/registry/address.d.ts +63 -0
- package/dist/registry/address.d.ts.map +1 -0
- package/dist/registry/address.js +65 -0
- package/dist/registry/catalog-read.d.ts +14 -0
- package/dist/registry/catalog-read.d.ts.map +1 -0
- package/dist/registry/catalog-read.js +58 -0
- package/dist/registry/deprecated.d.ts +37 -0
- package/dist/registry/deprecated.d.ts.map +1 -0
- package/dist/registry/deprecated.js +43 -0
- package/dist/registry/docs.d.ts +96 -0
- package/dist/registry/docs.d.ts.map +1 -0
- package/dist/registry/docs.js +210 -0
- package/dist/registry/edge/edge.d.ts +46 -0
- package/dist/registry/edge/edge.d.ts.map +1 -0
- package/dist/registry/edge/edge.js +194 -0
- package/dist/registry/edge/index.d.ts +11 -0
- package/dist/registry/edge/index.d.ts.map +1 -0
- package/dist/registry/edge/index.js +10 -0
- package/dist/registry/edge/lambda-edge.d.ts +76 -0
- package/dist/registry/edge/lambda-edge.d.ts.map +1 -0
- package/dist/registry/edge/lambda-edge.js +95 -0
- package/dist/registry/edge/sigv4-web.d.ts +33 -0
- package/dist/registry/edge/sigv4-web.d.ts.map +1 -0
- package/dist/registry/edge/sigv4-web.js +56 -0
- package/dist/registry/edge/token-source.d.ts +73 -0
- package/dist/registry/edge/token-source.d.ts.map +1 -0
- package/dist/registry/edge/token-source.js +115 -0
- package/dist/registry/edge/worker.d.ts +45 -0
- package/dist/registry/edge/worker.d.ts.map +1 -0
- package/dist/registry/edge/worker.js +26 -0
- package/dist/registry/handler.d.ts +25 -0
- package/dist/registry/handler.d.ts.map +1 -0
- package/dist/registry/handler.js +75 -0
- package/dist/registry/headers-file.d.ts +21 -0
- package/dist/registry/headers-file.d.ts.map +1 -0
- package/dist/registry/headers-file.js +57 -0
- package/dist/registry/index.d.ts +31 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +30 -0
- package/dist/registry/mirror-paths.d.ts +9 -0
- package/dist/registry/mirror-paths.d.ts.map +1 -0
- package/dist/registry/mirror-paths.js +8 -0
- package/dist/registry/mirror.d.ts +130 -0
- package/dist/registry/mirror.d.ts.map +1 -0
- package/dist/registry/mirror.js +319 -0
- package/dist/registry/proxies.d.ts +73 -0
- package/dist/registry/proxies.d.ts.map +1 -0
- package/dist/registry/proxies.js +111 -0
- package/dist/registry/reader.d.ts +57 -0
- package/dist/registry/reader.d.ts.map +1 -0
- package/dist/registry/reader.js +198 -0
- package/dist/registry/semver.d.ts +16 -0
- package/dist/registry/semver.d.ts.map +1 -0
- package/dist/registry/semver.js +24 -0
- package/dist/registry/serve.d.ts +24 -0
- package/dist/registry/serve.d.ts.map +1 -0
- package/dist/registry/serve.js +64 -0
- package/dist/registry/source-forms.d.ts +79 -0
- package/dist/registry/source-forms.d.ts.map +1 -0
- package/dist/registry/source-forms.js +202 -0
- package/dist/registry/targets/artifactory.d.ts +28 -0
- package/dist/registry/targets/artifactory.d.ts.map +1 -0
- package/dist/registry/targets/artifactory.js +206 -0
- package/dist/registry/targets/fake-artifactory.d.ts +30 -0
- package/dist/registry/targets/fake-artifactory.d.ts.map +1 -0
- package/dist/registry/targets/fake-artifactory.js +142 -0
- package/dist/registry/targets/fake-gitlab.d.ts +39 -0
- package/dist/registry/targets/fake-gitlab.d.ts.map +1 -0
- package/dist/registry/targets/fake-gitlab.js +136 -0
- package/dist/registry/targets/fake-hcp.d.ts +50 -0
- package/dist/registry/targets/fake-hcp.d.ts.map +1 -0
- package/dist/registry/targets/fake-hcp.js +202 -0
- package/dist/registry/targets/fake-http.d.ts +31 -0
- package/dist/registry/targets/fake-http.d.ts.map +1 -0
- package/dist/registry/targets/fake-http.js +87 -0
- package/dist/registry/targets/fake-nexus.d.ts +27 -0
- package/dist/registry/targets/fake-nexus.d.ts.map +1 -0
- package/dist/registry/targets/fake-nexus.js +137 -0
- package/dist/registry/targets/gitlab.d.ts +53 -0
- package/dist/registry/targets/gitlab.d.ts.map +1 -0
- package/dist/registry/targets/gitlab.js +187 -0
- package/dist/registry/targets/hcp.d.ts +29 -0
- package/dist/registry/targets/hcp.d.ts.map +1 -0
- package/dist/registry/targets/hcp.js +310 -0
- package/dist/registry/targets/hosted.d.ts +62 -0
- package/dist/registry/targets/hosted.d.ts.map +1 -0
- package/dist/registry/targets/hosted.js +74 -0
- package/dist/registry/targets/index.d.ts +18 -0
- package/dist/registry/targets/index.d.ts.map +1 -0
- package/dist/registry/targets/index.js +17 -0
- package/dist/registry/targets/module-target.d.ts +68 -0
- package/dist/registry/targets/module-target.d.ts.map +1 -0
- package/dist/registry/targets/module-target.js +63 -0
- package/dist/registry/targets/nexus.d.ts +43 -0
- package/dist/registry/targets/nexus.d.ts.map +1 -0
- package/dist/registry/targets/nexus.js +250 -0
- package/dist/registry/targets/zip.d.ts +55 -0
- package/dist/registry/targets/zip.d.ts.map +1 -0
- package/dist/registry/targets/zip.js +278 -0
- package/dist/registry/writer.d.ts +101 -0
- package/dist/registry/writer.d.ts.map +1 -0
- package/dist/registry/writer.js +109 -0
- package/dist/report.d.ts +15 -6
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +28 -55
- package/dist/rules/record-store.ts +122 -0
- package/dist/rules/tf001.ts +2 -2
- package/dist/rules/tf024.ts +105 -22
- package/dist/rules/tf046.ts +204 -0
- package/dist/rules/tf047.ts +114 -0
- package/dist/skills/chant-terraform.md +1 -1
- package/dist/state/azure-blob.d.ts +9 -0
- package/dist/state/azure-blob.d.ts.map +1 -0
- package/dist/state/azure-blob.js +8 -0
- package/dist/state/backend.d.ts +158 -0
- package/dist/state/backend.d.ts.map +1 -0
- package/dist/state/backend.js +406 -0
- package/dist/state/exec.d.ts +39 -0
- package/dist/state/exec.d.ts.map +1 -0
- package/dist/state/exec.js +80 -0
- package/dist/state/gcs.d.ts +8 -0
- package/dist/state/gcs.d.ts.map +1 -0
- package/dist/state/gcs.js +7 -0
- package/dist/state/index.d.ts +15 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +14 -0
- package/dist/state/locks.d.ts +105 -0
- package/dist/state/locks.d.ts.map +1 -0
- package/dist/state/locks.js +130 -0
- package/dist/state/object-store.d.ts +8 -0
- package/dist/state/object-store.d.ts.map +1 -0
- package/dist/state/object-store.js +7 -0
- package/dist/state/root-states.d.ts +131 -0
- package/dist/state/root-states.d.ts.map +1 -0
- package/dist/state/root-states.js +241 -0
- package/dist/state/s3.d.ts +21 -0
- package/dist/state/s3.d.ts.map +1 -0
- package/dist/state/s3.js +19 -0
- package/dist/state/store.d.ts +51 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/store.js +185 -0
- package/dist/state-ops.d.ts +255 -0
- package/dist/state-ops.d.ts.map +1 -0
- package/dist/state-ops.js +305 -0
- package/dist/state-reads.d.ts +57 -0
- package/dist/state-reads.d.ts.map +1 -0
- package/dist/state-reads.js +104 -0
- package/dist/terragrunt/affected.d.ts.map +1 -1
- package/dist/terragrunt/affected.js +2 -1
- package/dist/used-sources.d.ts +54 -0
- package/dist/used-sources.d.ts.map +1 -0
- package/dist/used-sources.js +157 -0
- package/package.json +24 -4
- package/src/__fixtures__/ACCEPTANCE.md +69 -7
- package/src/__fixtures__/compose/apply-failed-in-app.jsonl +12 -0
- package/src/__fixtures__/compose/state-app.json +66 -0
- package/src/__fixtures__/compose/state-edge.json +40 -0
- package/src/__fixtures__/compose/state-net.json +58 -0
- package/src/__fixtures__/compose/three-app.plan.json +184 -0
- package/src/__fixtures__/compose/three-composed.plan.json +509 -0
- package/src/__fixtures__/compose/three-edge.plan.json +144 -0
- package/src/__fixtures__/compose/three-net.plan.json +174 -0
- package/src/__fixtures__/compose/unknown-composed.plan.json +228 -0
- package/src/__fixtures__/compose/working-after-apply.json +145 -0
- package/src/__fixtures__/config-blocks/app/main.tf +61 -0
- package/src/__fixtures__/config-blocks/app/modules/network/main.tf +4 -0
- package/src/__fixtures__/config-blocks/app-json/main.tf.json +39 -0
- package/src/__fixtures__/config-files/shadow/main.tf +3 -0
- package/src/__fixtures__/config-files/shadow/main.tofu +3 -0
- package/src/__fixtures__/config-files/shadow/other.tf +3 -0
- package/src/__fixtures__/config-files/tf/main.tf +11 -0
- package/src/__fixtures__/config-files/tf-json/main.tf.json +18 -0
- package/src/__fixtures__/config-files/tofu/main.tofu +11 -0
- package/src/__fixtures__/config-files/tofu-json/main.tofu.json +18 -0
- package/src/__fixtures__/config-files/tofu-only/main.tofu +3 -0
- package/src/__fixtures__/drift-record/README.md +16 -0
- package/src/__fixtures__/drift-record/live-plan-sections.json +27 -0
- package/src/__fixtures__/drift-rows/live-root-plan.json +70 -0
- package/src/__fixtures__/drift-rows/refresh-plan.json +61 -0
- package/src/__fixtures__/instance-forms/app/main.tf +110 -0
- package/src/__fixtures__/instance-forms/app/modules/svc/main.tf +3 -0
- package/src/__fixtures__/instance-vars/app/main.tf +52 -0
- package/src/__fixtures__/instance-vars/app/modules/app/main.tf +12 -0
- package/src/__fixtures__/instance-vars/app/modules/edge/main.tf +3 -0
- package/src/__fixtures__/instance-vars/app/terraform.tfvars +1 -0
- package/src/__fixtures__/live-module-keyed/live-graph.json +259 -0
- package/src/__fixtures__/live-module-keyed/live-plan.json +87 -0
- package/src/__fixtures__/live-module-keyed/root/estate.chdf.hcl +1 -0
- package/src/__fixtures__/live-module-keyed/root/main.tf +21 -0
- package/src/__fixtures__/live-module-keyed/root/modules/app/main.tf +17 -0
- package/src/__fixtures__/live-module-keyed/root/modules/edge/main.tf +7 -0
- package/src/__fixtures__/live-module-keyed/root/versions.tf +30 -0
- package/src/__fixtures__/live-module-keyed/show-state.json +146 -0
- package/src/__fixtures__/pr-loop/README.md +50 -0
- package/src/__fixtures__/pr-loop/chant.config.json +13 -0
- package/src/__fixtures__/pr-loop/estate.component.ts +10 -0
- package/src/__fixtures__/pr-loop/roots/a/main.tf +11 -0
- package/src/__fixtures__/pr-loop/roots/app/main.tf +19 -0
- package/src/__fixtures__/pr-loop/roots/b/main.tf +7 -0
- package/src/__fixtures__/pr-loop/roots/dns/main.tf +3 -0
- package/src/__fixtures__/pr-loop/roots/net/main.tf +7 -0
- package/src/__fixtures__/report/applied.show.json +51 -0
- package/src/__fixtures__/report/generate.ts +63 -0
- package/src/__fixtures__/report/plan.show.json +200 -0
- package/src/__fixtures__/report/tf-apply/change-set.json +170 -0
- package/src/__fixtures__/report/tf-apply/report.json +338 -0
- package/src/__fixtures__/report/tf-plan/change-set.json +170 -0
- package/src/__fixtures__/report/tf-plan/report.json +320 -0
- package/src/__fixtures__/three-cloud-azure.graph.json +290 -0
- package/src/__fixtures__/used-sources/root/extra.tofu +1 -0
- package/src/__fixtures__/used-sources/root/main.tf +31 -0
- package/src/__fixtures__/used-sources/root/modules/net/main.tf +14 -0
- package/src/__fixtures__/used-sources/root/modules/net/versions.tf.json +7 -0
- package/src/__fixtures__/used-sources/unit/terragrunt.hcl +3 -0
- package/src/applied-state.ts +52 -0
- package/src/backend-config.test.ts +105 -0
- package/src/backend-config.ts +133 -0
- package/src/behaviour/kinds.ts +4 -0
- package/src/behaviour/predict.ts +5 -2
- package/src/behaviour/reference-catalog.plugin.test.ts +65 -0
- package/src/behaviour/reference-catalog.ts +16 -5
- package/src/behaviour/request.ts +3 -2
- package/src/change-set-instances.test.ts +98 -0
- package/src/changed-roots.ts +14 -16
- package/src/ci-setup.ts +42 -0
- package/src/commands.ts +4 -3
- package/src/components/capability-plugin.test.ts +198 -19
- package/src/components/capability-plugin.ts +383 -35
- package/src/components/change-set-graph.e2e.test.ts +11 -5
- package/src/components/compose-group.test.ts +486 -0
- package/src/components/compose-group.ts +489 -0
- package/src/components/demo-composed-roots.e2e.test.ts +440 -0
- package/src/components/member-outputs.test.ts +76 -0
- package/src/components/placeholder-preview.test.ts +147 -0
- package/src/components/placeholder-preview.ts +257 -0
- package/src/components/pr-loop-compose.tofu.e2e.test.ts +363 -0
- package/src/components/pr-loop.tofu.test.ts +113 -57
- package/src/components/release-inputs.ts +69 -0
- package/src/components/trace-facts.test.ts +21 -0
- package/src/components/trace-facts.ts +27 -0
- package/src/compose/apply-events.test.ts +62 -0
- package/src/compose/apply-events.ts +100 -0
- package/src/compose/estate.choudoufu.e2e.test.ts +112 -0
- package/src/compose/estate.test.ts +421 -0
- package/src/compose/estate.ts +443 -0
- package/src/compose/hcl.ts +311 -0
- package/src/compose/module-address.ts +49 -0
- package/src/compose/root.test.ts +416 -0
- package/src/compose/root.ts +592 -0
- package/src/compose/run.test.ts +440 -0
- package/src/compose/run.tofu.test.ts +176 -0
- package/src/compose/run.ts +527 -0
- package/src/compose/slice.test.ts +184 -0
- package/src/compose/slice.ts +290 -0
- package/src/compose/state-address.ts +157 -0
- package/src/compose/state-merge.test.ts +131 -0
- package/src/compose/state-merge.ts +148 -0
- package/src/compose.test.ts +248 -0
- package/src/compose.ts +627 -0
- package/src/composites/terraform-apply-op.test.ts +9 -0
- package/src/composites/terraform-apply-op.ts +7 -3
- package/src/cone.ts +138 -0
- package/src/config-file-listers.test.ts +265 -0
- package/src/config.ts +44 -9
- package/src/cost-hold.ts +29 -0
- package/src/describe-resources.engine-facts.test.ts +411 -0
- package/src/describe-resources.live-module-keyed.test.ts +290 -0
- package/src/describe-resources.ts +416 -70
- package/src/drift-read.ts +284 -0
- package/src/drift-record.test.ts +223 -0
- package/src/drift-record.ts +455 -0
- package/src/drift-rows.test.ts +135 -0
- package/src/drift-rows.ts +137 -0
- package/src/exit-codes.test.ts +23 -0
- package/src/exit-codes.ts +59 -0
- package/src/hcl/config-blocks.test.ts +174 -0
- package/src/hcl/edges.ts +21 -1
- package/src/hcl/files.ts +234 -0
- package/src/hcl/instance-forms.test.ts +94 -0
- package/src/hcl/instances.test.ts +137 -0
- package/src/hcl/instances.ts +422 -0
- package/src/hcl/parse.test.ts +139 -1
- package/src/hcl/parse.ts +149 -16
- package/src/hcl/roots.ts +6 -0
- package/src/hcl/suppressions.ts +8 -2
- package/src/index.ts +79 -0
- package/src/lint/audit-catalog.ts +29 -3
- package/src/lint/audit-lineage.ts +14 -2
- package/src/lint/post-synth/fixtures/TF024/live-with-record-store/main.tf +18 -0
- package/src/lint/post-synth/fixtures/TF024/sidecar-with-backend/estate.chdf.hcl +1 -0
- package/src/lint/post-synth/fixtures/TF024/sidecar-with-backend/main.tf +10 -0
- package/src/lint/post-synth/fixtures/TF046/azurerm-no-resource-group/main.tf +15 -0
- package/src/lint/post-synth/fixtures/TF046/backend-config-only/main.tf +14 -0
- package/src/lint/post-synth/fixtures/TF046/derived-s3/backend.tf +7 -0
- package/src/lint/post-synth/fixtures/TF046/derived-s3/main.tf +9 -0
- package/src/lint/post-synth/fixtures/TF046/explicit-local/main.tf +16 -0
- package/src/lint/post-synth/fixtures/TF046/explicit-s3-beside-local-backend/main.tf +15 -0
- package/src/lint/post-synth/fixtures/TF046/implied-local/main.tf +9 -0
- package/src/lint/post-synth/fixtures/TF046/sidecar-implied/estate.chdf.hcl +1 -0
- package/src/lint/post-synth/fixtures/TF046/sidecar-implied/main.tf +5 -0
- package/src/lint/post-synth/fixtures/TF047/clear/main.tf +12 -0
- package/src/lint/post-synth/fixtures/TF047/refused/main.tf +12 -0
- package/src/lint/post-synth/fixtures/TF047/unknown-module/main.tf +12 -0
- package/src/lint/post-synth/fixtures/TF047/unknown-version/main.tf +12 -0
- package/src/lint/post-synth/index.ts +4 -0
- package/src/lint/post-synth/record-store.ts +122 -0
- package/src/lint/post-synth/tf001.ts +2 -2
- package/src/lint/post-synth/tf024.test.ts +26 -5
- package/src/lint/post-synth/tf024.ts +105 -22
- package/src/lint/post-synth/tf046.test.ts +137 -0
- package/src/lint/post-synth/tf046.ts +204 -0
- package/src/lint/post-synth/tf047.test.ts +56 -0
- package/src/lint/post-synth/tf047.ts +114 -0
- package/src/live-plan-reasons.ts +54 -0
- package/src/lock-rows.test.ts +70 -0
- package/src/lock-rows.ts +82 -0
- package/src/lock-timeout.ts +34 -0
- package/src/lsp/completions.test.ts +1 -1
- package/src/lsp/option-keys.ts +2 -0
- package/src/module-catalog/index.test.ts +93 -0
- package/src/module-catalog/index.ts +159 -0
- package/src/module-catalog/refresh-cli.ts +68 -0
- package/src/module-catalog/static-tier.ts +1659 -0
- package/src/module-catalog/types.ts +88 -0
- package/src/op/activities/choudoufu-plan-set-op.test.ts +111 -0
- package/src/op/activities/index.ts +9 -0
- package/src/op/activities/live-detect.ts +55 -26
- package/src/op/activities/pin-rollout.ts +3 -0
- package/src/op/activities/registry.test.ts +2 -1
- package/src/op/activities/terraform.test.ts +55 -0
- package/src/op/activities/terraform.ts +312 -27
- package/src/op/activity-contracts.test.ts +1 -0
- package/src/op/activity-contracts.ts +24 -1
- package/src/op/builders.ts +14 -0
- package/src/op-wave-step.test.ts +109 -0
- package/src/pin/__fixtures__/consumers/live/dev/main.tf +4 -0
- package/src/pin/__fixtures__/consumers/live/prod/main.tf +21 -0
- package/src/pin/__fixtures__/consumers/units/vpc/terragrunt.hcl +7 -0
- package/src/pin/bundle.test.ts +2 -0
- package/src/pin/consumers.test.ts +57 -0
- package/src/pin/consumers.ts +95 -0
- package/src/pin/edit.ts +30 -0
- package/src/pin/rollout.ts +16 -11
- package/src/plan-shape.test.ts +148 -0
- package/src/plan-shape.ts +128 -0
- package/src/plugin.ts +39 -19
- package/src/registry/__fixtures__/docs/documented/.terraform-docs.yml +3 -0
- package/src/registry/__fixtures__/docs/documented/README.md +1 -0
- package/src/registry/__fixtures__/docs/documented/main.tf +8 -0
- package/src/registry/__fixtures__/docs/json/main.tf.json +14 -0
- package/src/registry/__fixtures__/docs/vpc/README.md +3 -0
- package/src/registry/__fixtures__/docs/vpc/examples/complete/main.tf +5 -0
- package/src/registry/__fixtures__/docs/vpc/examples/simple/README.md +1 -0
- package/src/registry/__fixtures__/docs/vpc/examples/simple/main.tf +4 -0
- package/src/registry/__fixtures__/docs/vpc/main.tf +14 -0
- package/src/registry/__fixtures__/docs/vpc/outputs.tf +9 -0
- package/src/registry/__fixtures__/docs/vpc/variables.tf +16 -0
- package/src/registry/__fixtures__/proxied-root/main.tf +12 -0
- package/src/registry/address.ts +100 -0
- package/src/registry/catalog-read.ts +56 -0
- package/src/registry/deprecated.test.ts +139 -0
- package/src/registry/deprecated.ts +76 -0
- package/src/registry/docs.test.ts +140 -0
- package/src/registry/docs.ts +299 -0
- package/src/registry/edge/bundle.test.ts +50 -0
- package/src/registry/edge/edge.test.ts +176 -0
- package/src/registry/edge/edge.ts +211 -0
- package/src/registry/edge/index.ts +10 -0
- package/src/registry/edge/lambda-edge.ts +127 -0
- package/src/registry/edge/sigv4-web.ts +79 -0
- package/src/registry/edge/token-source.test.ts +258 -0
- package/src/registry/edge/token-source.ts +169 -0
- package/src/registry/edge/worker.ts +61 -0
- package/src/registry/handler.ts +89 -0
- package/src/registry/headers-file.ts +61 -0
- package/src/registry/index.ts +31 -0
- package/src/registry/mirror-paths.ts +10 -0
- package/src/registry/mirror.test.ts +198 -0
- package/src/registry/mirror.ts +395 -0
- package/src/registry/proxies.test.ts +153 -0
- package/src/registry/proxies.ts +132 -0
- package/src/registry/reader.ts +225 -0
- package/src/registry/registry.test.ts +262 -0
- package/src/registry/semver.ts +34 -0
- package/src/registry/serve.ts +82 -0
- package/src/registry/source-forms.test.ts +87 -0
- package/src/registry/source-forms.ts +216 -0
- package/src/registry/targets/artifactory.test.ts +248 -0
- package/src/registry/targets/artifactory.ts +257 -0
- package/src/registry/targets/fake-artifactory.ts +158 -0
- package/src/registry/targets/fake-gitlab.ts +161 -0
- package/src/registry/targets/fake-hcp.ts +233 -0
- package/src/registry/targets/fake-http.ts +97 -0
- package/src/registry/targets/fake-nexus.ts +152 -0
- package/src/registry/targets/gitlab.test.ts +208 -0
- package/src/registry/targets/gitlab.ts +223 -0
- package/src/registry/targets/hcp.test.ts +230 -0
- package/src/registry/targets/hcp.ts +360 -0
- package/src/registry/targets/hosted.ts +117 -0
- package/src/registry/targets/index.ts +17 -0
- package/src/registry/targets/module-target.ts +131 -0
- package/src/registry/targets/nexus.test.ts +220 -0
- package/src/registry/targets/nexus.ts +314 -0
- package/src/registry/targets/zip.test.ts +65 -0
- package/src/registry/targets/zip.ts +287 -0
- package/src/registry/writer.ts +155 -0
- package/src/report.test.ts +82 -1
- package/src/report.ts +31 -54
- package/src/signal-only-root.test.ts +72 -0
- package/src/skills/chant-terraform.md +1 -1
- package/src/state/azure-blob.ts +8 -0
- package/src/state/backend-verdict.test.ts +187 -0
- package/src/state/backend.test.ts +127 -0
- package/src/state/backend.ts +488 -0
- package/src/state/exec.ts +111 -0
- package/src/state/gcs.ts +7 -0
- package/src/state/index.ts +15 -0
- package/src/state/locks.test.ts +84 -0
- package/src/state/locks.ts +201 -0
- package/src/state/object-store.ts +7 -0
- package/src/state/root-states-floci.e2e.test.ts +66 -0
- package/src/state/root-states.test.ts +462 -0
- package/src/state/root-states.ts +309 -0
- package/src/state/s3.ts +21 -0
- package/src/state/store.ts +225 -0
- package/src/state-ops.test.ts +182 -0
- package/src/state-ops.ts +462 -0
- package/src/state-reads.ts +116 -0
- package/src/terragrunt/affected.ts +2 -1
- package/src/used-sources.test.ts +75 -0
- package/src/used-sources.ts +204 -0
- package/src/workspace-kinds.test.ts +4 -17
- package/workspace-kinds.json +1 -24
- package/dist/workspace-member.d.ts +0 -30
- package/dist/workspace-member.d.ts.map +0 -1
- package/dist/workspace-member.js +0 -91
- package/schemas/pulumi.schema.json +0 -34
- package/src/testdata/pulumi-member/Pulumi.yaml +0 -2
- package/src/testdata/pulumi-member/stack-export.json +0 -53
- package/src/testdata/pulumi-unexported/Pulumi.yaml +0 -2
- package/src/workspace-member.test.ts +0 -89
- package/src/workspace-member.ts +0 -126
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../src/state/s3.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAE1F,OAAO,EAAE,yBAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAElK;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,QAAQ,CAEtH"}
|
package/dist/state/s3.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The S3 client a state's lock and write use: chant core's (#4554,
|
|
3
|
+
* `@intentius/chant/object-store`), which signs with chant's one AWS
|
|
4
|
+
* signer. Get, put, put only when absent, head and delete one object; with
|
|
5
|
+
* no static keys, a role is assumed with the job's OIDC token through STS
|
|
6
|
+
* AssumeRoleWithWebIdentity.
|
|
7
|
+
*/
|
|
8
|
+
import { s3FromEnv as coreS3FromEnv } from "@intentius/chant/object-store";
|
|
9
|
+
export { assumeRoleWithWebIdentity, S3Client, sign } from "@intentius/chant/object-store";
|
|
10
|
+
/**
|
|
11
|
+
* The target for `bucket` from the AWS environment variables. Credentials,
|
|
12
|
+
* first match wins: static keys in `AWS_ACCESS_KEY_ID` and
|
|
13
|
+
* `AWS_SECRET_ACCESS_KEY`; `AWS_ROLE_ARN` assumed with the token in
|
|
14
|
+
* `AWS_WEB_IDENTITY_TOKEN_FILE`, in a session named `chant-state` unless
|
|
15
|
+
* AWS_ROLE_SESSION_NAME names one.
|
|
16
|
+
*/
|
|
17
|
+
export function s3FromEnv(where, env = process.env) {
|
|
18
|
+
return coreS3FromEnv({ ...where, sessionName: "chant-state", setting: "the state bucket" }, env);
|
|
19
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { LockableState } from "./backend.js";
|
|
2
|
+
import { type StoreFetch } from "./object-store.js";
|
|
3
|
+
/** The lock a state's backend holds: the ID `force-unlock` takes, and the lock info the binary (or a run) wrote. */
|
|
4
|
+
export interface LockHolder {
|
|
5
|
+
id: string;
|
|
6
|
+
/** The lock info as written, JSON. */
|
|
7
|
+
info: string;
|
|
8
|
+
}
|
|
9
|
+
/** A state where it is, for what locks it and keeps beside it. */
|
|
10
|
+
export interface StateStore {
|
|
11
|
+
readonly backend: LockableState["backend"];
|
|
12
|
+
/** Where the state is. */
|
|
13
|
+
readonly location: string;
|
|
14
|
+
/** Where its lock is: the lock object, or the blob whose lease is the lock. */
|
|
15
|
+
readonly lockLocation: string;
|
|
16
|
+
/** The lock the backend holds now, or undefined. */
|
|
17
|
+
heldLock(): Promise<LockHolder | undefined>;
|
|
18
|
+
/** Take the state's lock with `info`, the way the backend takes it: false when it is held. */
|
|
19
|
+
lock(info: string): Promise<boolean>;
|
|
20
|
+
/** Release the lock `lock` took, or the one `adopt` took over. */
|
|
21
|
+
unlock(): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Write a new state under the lock, for a backend whose lock keeps the
|
|
24
|
+
* binary from writing (azurerm's lease); undefined for a backend the
|
|
25
|
+
* binary writes with `-lock=false` while the run holds the lock.
|
|
26
|
+
*/
|
|
27
|
+
write?: (body: string) => Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* The object beside the state whose key is the state's with `suffix` after
|
|
30
|
+
* it, in the same bucket, container or directory, under the state's own
|
|
31
|
+
* access controls: read (undefined when there is none), written, removed.
|
|
32
|
+
*/
|
|
33
|
+
readBeside(suffix: string): Promise<string | undefined>;
|
|
34
|
+
writeBeside(suffix: string, body: string): Promise<void>;
|
|
35
|
+
removeBeside(suffix: string): Promise<void>;
|
|
36
|
+
/** Where the object beside the state with `suffix` is, for messages. */
|
|
37
|
+
besideLocation(suffix: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Take over a lock this store finds held, which an earlier run of the same
|
|
40
|
+
* operation left held on purpose: `unlock` then releases it. A lease
|
|
41
|
+
* (azurerm) is taken over by its ID, the others need nothing.
|
|
42
|
+
*/
|
|
43
|
+
adopt(held: LockHolder): void;
|
|
44
|
+
}
|
|
45
|
+
/** The ID in a lock info's JSON, or "" when it names none. */
|
|
46
|
+
export declare function lockId(text: string): string;
|
|
47
|
+
/** The metadata an azurerm backend keeps a lock's info in, base64 JSON, on the leased blob. */
|
|
48
|
+
export declare const LOCK_METADATA = "terraformlockid";
|
|
49
|
+
/** The store a state is in, opened with the credentials stateObject chose. `dir` is the root a local path is relative to. */
|
|
50
|
+
export declare function stateStore(o: LockableState, dir: string, fetchFn?: StoreFetch): StateStore;
|
|
51
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/state/store.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAoC,aAAa,EAAW,MAAM,WAAW,CAAC;AAE1F,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG7D,oHAAoH;AACpH,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C,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,CAK1F"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A state where it is, opened for its lock and for what a run keeps beside
|
|
3
|
+
* it. Each backend locks its own way:
|
|
4
|
+
*
|
|
5
|
+
* s3 the lock file `use_lockfile` takes, `<key>.tflock`, written only
|
|
6
|
+
* when absent
|
|
7
|
+
* gcs the lock object `<prefix>/<workspace>.tflock`, written only when
|
|
8
|
+
* absent; the ID `force-unlock` takes is its generation
|
|
9
|
+
* azurerm a lease on the state blob, with the lock info base64 in its
|
|
10
|
+
* `terraformlockid` metadata; the binary cannot write the blob
|
|
11
|
+
* while chant holds the lease, so the store writes it
|
|
12
|
+
* local a lock file `<path>.tflock` beside the state, created only when
|
|
13
|
+
* absent. It keeps another chant run out; the binary's own local
|
|
14
|
+
* lock is a file lock it takes per command, so the run writes
|
|
15
|
+
* with `-lock=false` while it holds this one. A bare
|
|
16
|
+
* `terraform apply` on the same checkout at the same time is not
|
|
17
|
+
* kept out. Ruled on #4481 (ruling 4, 2026-10-25): chant's own
|
|
18
|
+
* lock file, no Terraform lock-info file, local backends allowed.
|
|
19
|
+
*
|
|
20
|
+
* Lifted from terragucci's `backend.ts` (c493e0e): `StateStore`, `s3Store`,
|
|
21
|
+
* `gcsStore` and `azureStore`, plus a local store and `removeBeside`.
|
|
22
|
+
*/
|
|
23
|
+
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
24
|
+
import { dirname, isAbsolute, join } from "node:path";
|
|
25
|
+
import { AzureBlobClient } from "./azure-blob.js";
|
|
26
|
+
import { GcsClient } from "./gcs.js";
|
|
27
|
+
import { StoreError } from "./object-store.js";
|
|
28
|
+
import { S3Client } from "./s3.js";
|
|
29
|
+
/** The ID in a lock info's JSON, or "" when it names none. */
|
|
30
|
+
export function lockId(text) {
|
|
31
|
+
try {
|
|
32
|
+
const v = JSON.parse(text);
|
|
33
|
+
return typeof v.ID === "string" ? v.ID : "";
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return "";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const JSON_TYPE = "application/json";
|
|
40
|
+
/** The S3 state, locked by the lock file `use_lockfile` takes. */
|
|
41
|
+
function s3Store(o, fetchFn) {
|
|
42
|
+
const client = new S3Client(o.target, fetchFn);
|
|
43
|
+
const lockKey = `${o.key}.tflock`;
|
|
44
|
+
return {
|
|
45
|
+
backend: "s3",
|
|
46
|
+
location: `s3://${o.bucket}/${o.key}`,
|
|
47
|
+
lockLocation: `s3://${o.bucket}/${lockKey}`,
|
|
48
|
+
heldLock: async () => {
|
|
49
|
+
const text = await client.get(lockKey);
|
|
50
|
+
return text === undefined ? undefined : { id: lockId(text), info: text };
|
|
51
|
+
},
|
|
52
|
+
lock: (info) => client.putIfAbsent(lockKey, info, JSON_TYPE),
|
|
53
|
+
unlock: () => client.remove(lockKey),
|
|
54
|
+
readBeside: (suffix) => client.get(`${o.key}${suffix}`),
|
|
55
|
+
writeBeside: async (suffix, body) => void (await client.put(`${o.key}${suffix}`, body, JSON_TYPE)),
|
|
56
|
+
removeBeside: (suffix) => client.remove(`${o.key}${suffix}`),
|
|
57
|
+
besideLocation: (suffix) => `s3://${o.bucket}/${o.key}${suffix}`,
|
|
58
|
+
adopt: () => { },
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** The GCS state, locked by `<prefix>/<workspace>.tflock`, whose generation is the lock's ID. */
|
|
62
|
+
function gcsStore(o, fetchFn) {
|
|
63
|
+
const client = new GcsClient(o.target, fetchFn);
|
|
64
|
+
return {
|
|
65
|
+
backend: "gcs",
|
|
66
|
+
location: `gs://${o.bucket}/${o.key}`,
|
|
67
|
+
lockLocation: `gs://${o.bucket}/${o.lock}`,
|
|
68
|
+
heldLock: async () => {
|
|
69
|
+
const head = await client.head(o.lock);
|
|
70
|
+
const info = head.exists ? await client.get(o.lock) : undefined;
|
|
71
|
+
if (!head.exists || info === undefined)
|
|
72
|
+
return undefined;
|
|
73
|
+
return { id: head.generation ?? lockId(info), info };
|
|
74
|
+
},
|
|
75
|
+
lock: (info) => client.putIfAbsent(o.lock, info, JSON_TYPE),
|
|
76
|
+
unlock: () => client.remove(o.lock),
|
|
77
|
+
readBeside: (suffix) => client.get(`${o.key}${suffix}`),
|
|
78
|
+
writeBeside: async (suffix, body) => void (await client.put(`${o.key}${suffix}`, body, JSON_TYPE)),
|
|
79
|
+
removeBeside: (suffix) => client.remove(`${o.key}${suffix}`),
|
|
80
|
+
besideLocation: (suffix) => `gs://${o.bucket}/${o.key}${suffix}`,
|
|
81
|
+
adopt: () => { },
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** The metadata an azurerm backend keeps a lock's info in, base64 JSON, on the leased blob. */
|
|
85
|
+
export const LOCK_METADATA = "terraformlockid";
|
|
86
|
+
/** The azurerm state blob, locked by a lease on it with the lock info in its metadata. */
|
|
87
|
+
function azureStore(o, fetchFn) {
|
|
88
|
+
const client = new AzureBlobClient({ account: o.account, container: o.container, endpoint: o.endpoint, ...o.auth }, fetchFn);
|
|
89
|
+
let leaseId;
|
|
90
|
+
const at = `az://${o.account}/${o.container}/${o.key}`;
|
|
91
|
+
return {
|
|
92
|
+
backend: "azurerm",
|
|
93
|
+
location: at,
|
|
94
|
+
lockLocation: at,
|
|
95
|
+
heldLock: async () => {
|
|
96
|
+
const head = await client.head(o.key);
|
|
97
|
+
if (!head.exists || head.leaseState !== "leased")
|
|
98
|
+
return undefined;
|
|
99
|
+
const meta = head.metadata[LOCK_METADATA];
|
|
100
|
+
const info = meta ? Buffer.from(meta, "base64").toString("utf-8") : "";
|
|
101
|
+
return { id: lockId(info), info };
|
|
102
|
+
},
|
|
103
|
+
lock: async (info) => {
|
|
104
|
+
const id = lockId(info);
|
|
105
|
+
// The backend leases a blob that is there: a state with none yet gets an empty one first, as the backend makes it.
|
|
106
|
+
if (!(await client.head(o.key)).exists)
|
|
107
|
+
await client.putBlob(o.key, "", JSON_TYPE, { ifNoneMatch: true });
|
|
108
|
+
if (!(await client.lease(o.key, "acquire", id)))
|
|
109
|
+
return false;
|
|
110
|
+
leaseId = id;
|
|
111
|
+
await client.setMetadata(o.key, { [LOCK_METADATA]: Buffer.from(info).toString("base64") }, id);
|
|
112
|
+
return true;
|
|
113
|
+
},
|
|
114
|
+
unlock: async () => {
|
|
115
|
+
if (!leaseId)
|
|
116
|
+
return;
|
|
117
|
+
const id = leaseId;
|
|
118
|
+
await client.setMetadata(o.key, {}, id);
|
|
119
|
+
await client.lease(o.key, "release", id);
|
|
120
|
+
leaseId = undefined;
|
|
121
|
+
},
|
|
122
|
+
write: async (body) => {
|
|
123
|
+
if (!leaseId)
|
|
124
|
+
throw new StoreError(`${at} is written under its lease, and none is held`);
|
|
125
|
+
// As the backend writes it: a snapshot first when it takes snapshots, and the lock info kept on the blob.
|
|
126
|
+
if (o.snapshot && (await client.head(o.key)).exists)
|
|
127
|
+
await client.snapshot(o.key);
|
|
128
|
+
const meta = (await client.head(o.key)).metadata;
|
|
129
|
+
await client.putBlob(o.key, body, JSON_TYPE, { leaseId, metadata: meta });
|
|
130
|
+
},
|
|
131
|
+
readBeside: (suffix) => client.get(`${o.key}${suffix}`),
|
|
132
|
+
writeBeside: async (suffix, body) => void (await client.putBlob(`${o.key}${suffix}`, body, JSON_TYPE)),
|
|
133
|
+
removeBeside: (suffix) => client.remove(`${o.key}${suffix}`),
|
|
134
|
+
besideLocation: (suffix) => `${at}${suffix}`,
|
|
135
|
+
adopt: (held) => {
|
|
136
|
+
leaseId = held.id;
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/** A local state, locked by `<path>.tflock` created only when absent. `dir` is the root the path is relative to. */
|
|
141
|
+
function localStore(o, dir) {
|
|
142
|
+
const file = isAbsolute(o.path) ? o.path : join(dir, o.path);
|
|
143
|
+
const lockFile = `${file}.tflock`;
|
|
144
|
+
const read = (f) => (existsSync(f) ? readFileSync(f, "utf-8") : undefined);
|
|
145
|
+
return {
|
|
146
|
+
backend: "local",
|
|
147
|
+
location: file,
|
|
148
|
+
lockLocation: lockFile,
|
|
149
|
+
heldLock: async () => {
|
|
150
|
+
const text = read(lockFile);
|
|
151
|
+
return text === undefined ? undefined : { id: lockId(text), info: text };
|
|
152
|
+
},
|
|
153
|
+
lock: async (info) => {
|
|
154
|
+
mkdirSync(dirname(lockFile), { recursive: true });
|
|
155
|
+
try {
|
|
156
|
+
writeFileSync(lockFile, info, { flag: "wx" });
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
if (e.code === "EEXIST")
|
|
161
|
+
return false;
|
|
162
|
+
throw e;
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
unlock: async () => rmSync(lockFile, { force: true }),
|
|
166
|
+
readBeside: async (suffix) => read(`${file}${suffix}`),
|
|
167
|
+
writeBeside: async (suffix, body) => {
|
|
168
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
169
|
+
writeFileSync(`${file}${suffix}`, body);
|
|
170
|
+
},
|
|
171
|
+
removeBeside: async (suffix) => rmSync(`${file}${suffix}`, { force: true }),
|
|
172
|
+
besideLocation: (suffix) => `${file}${suffix}`,
|
|
173
|
+
adopt: () => { },
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/** The store a state is in, opened with the credentials stateObject chose. `dir` is the root a local path is relative to. */
|
|
177
|
+
export function stateStore(o, dir, fetchFn) {
|
|
178
|
+
if (o.backend === "s3")
|
|
179
|
+
return s3Store(o, fetchFn);
|
|
180
|
+
if (o.backend === "gcs")
|
|
181
|
+
return gcsStore(o, fetchFn);
|
|
182
|
+
if (o.backend === "azurerm")
|
|
183
|
+
return azureStore(o, fetchFn);
|
|
184
|
+
return localStore(o, dir);
|
|
185
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import type { Capability } from "@intentius/chant/components/capability";
|
|
2
|
+
import type { ChangeSetPart } from "@intentius/chant/change-set";
|
|
3
|
+
import { finishGatedRequest, readGatedRequests, requestGate, spendGatedRequest, type GatedRequest, type GatedRequestRules, type RequestGateInput, type RequestGateResult } from "@intentius/chant/lifecycle/gated-request";
|
|
4
|
+
import { type BinaryExec } from "./state/exec.js";
|
|
5
|
+
/** The ops the gated requests of this module wait at, one per kind, as terragucci named them. */
|
|
6
|
+
export declare const STATE_OPS: {
|
|
7
|
+
readonly unlock: "tf-unlock";
|
|
8
|
+
readonly migrate: "tf-migrate";
|
|
9
|
+
readonly export: "tf-state-export";
|
|
10
|
+
};
|
|
11
|
+
/** The request kinds of #4551's design. */
|
|
12
|
+
export declare const STATE_OP_KINDS: {
|
|
13
|
+
readonly unlock: "unlock";
|
|
14
|
+
readonly migrate: "migrate";
|
|
15
|
+
readonly export: "state-export";
|
|
16
|
+
};
|
|
17
|
+
/** A binary run that exited non-zero, with the tail of its output. */
|
|
18
|
+
export declare class StateOpError extends Error {
|
|
19
|
+
readonly root: string;
|
|
20
|
+
readonly command: string;
|
|
21
|
+
readonly code: number;
|
|
22
|
+
readonly tail: string;
|
|
23
|
+
constructor(root: string, command: string, code: number, tail: string);
|
|
24
|
+
}
|
|
25
|
+
/** A gated operation stopped for a person: its request waits for an approval. The command that ran it exits 3. */
|
|
26
|
+
export declare class StateOpWaitingError extends Error {
|
|
27
|
+
readonly op: string;
|
|
28
|
+
readonly subject: string;
|
|
29
|
+
readonly digest: string;
|
|
30
|
+
readonly command: string;
|
|
31
|
+
readonly exitCode: 3;
|
|
32
|
+
constructor(op: string, subject: string, digest: string, command: string);
|
|
33
|
+
}
|
|
34
|
+
/** Where and how the binary runs for one root. */
|
|
35
|
+
export interface RootRun {
|
|
36
|
+
/** The root's name, as messages and records name it. */
|
|
37
|
+
root: string;
|
|
38
|
+
binary: string;
|
|
39
|
+
/** The root's directory. */
|
|
40
|
+
dir: string;
|
|
41
|
+
env?: NodeJS.ProcessEnv;
|
|
42
|
+
exec?: BinaryExec;
|
|
43
|
+
}
|
|
44
|
+
/** `init -input=false -no-color`, with `-reconfigure` and `-backend-config` pairs when given. */
|
|
45
|
+
export declare function initRoot(r: RootRun & {
|
|
46
|
+
backendConfig?: Record<string, string>;
|
|
47
|
+
reconfigure?: boolean;
|
|
48
|
+
}): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Release the state lock with this ID: `force-unlock -force -no-color <id>`.
|
|
51
|
+
* Run it under {@link gatedStateOp}; the binary releases whichever lock has
|
|
52
|
+
* the ID, so the approval binds the ID and the lock's location.
|
|
53
|
+
*/
|
|
54
|
+
export declare function forceUnlockState(r: RootRun & {
|
|
55
|
+
id: string;
|
|
56
|
+
}): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Write a state file with `state push`. `lock: false` passes `-lock=false`,
|
|
59
|
+
* for a caller that holds the state's lock itself; `force` passes `-force`,
|
|
60
|
+
* for a push over an empty state of another lineage the caller checked.
|
|
61
|
+
*/
|
|
62
|
+
export declare function pushStateFile(r: RootRun & {
|
|
63
|
+
file: string;
|
|
64
|
+
lock?: boolean;
|
|
65
|
+
force?: boolean;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
/** A plan read back: its JSON, and the binary's summary line. */
|
|
68
|
+
export interface PlanRead {
|
|
69
|
+
planFile: string;
|
|
70
|
+
json: unknown;
|
|
71
|
+
summary: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Plan a root against its state and read the plan: the check a migration
|
|
75
|
+
* makes before and after it writes. `lock: false` passes `-lock=false`, for a
|
|
76
|
+
* caller that holds the lock itself.
|
|
77
|
+
*/
|
|
78
|
+
export declare function planStateCheck(r: RootRun & {
|
|
79
|
+
planFile: string;
|
|
80
|
+
lock?: boolean;
|
|
81
|
+
}): Promise<PlanRead>;
|
|
82
|
+
/** A copy's plan: the plan read back, and its change-set part with the member's plan digest. */
|
|
83
|
+
export interface CopyPlanRead extends PlanRead {
|
|
84
|
+
part: ChangeSetPart;
|
|
85
|
+
planDigest: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Initialise a root under its copy's backend settings and plan it, a destroy
|
|
89
|
+
* with `destroy`. `backendConfig` is what makes it the copy (a state key with
|
|
90
|
+
* the copy's suffix), so it is required and never empty: without it the plan
|
|
91
|
+
* would be of the root's own state. Pass `init: false` for a root another
|
|
92
|
+
* tool initialised (a Terragrunt unit prepared with the suffix set).
|
|
93
|
+
*/
|
|
94
|
+
export declare function planCopy(r: RootRun & {
|
|
95
|
+
backendConfig: Record<string, string>;
|
|
96
|
+
planFile: string;
|
|
97
|
+
destroy?: boolean;
|
|
98
|
+
lockTimeout?: string | false;
|
|
99
|
+
init?: boolean;
|
|
100
|
+
}): Promise<CopyPlanRead>;
|
|
101
|
+
/** Apply a saved plan, and nothing else: `apply -input=false -no-color <plan>`. */
|
|
102
|
+
export declare function applyPlanFile(r: RootRun & {
|
|
103
|
+
planFile: string;
|
|
104
|
+
lockTimeout?: string | false;
|
|
105
|
+
}): Promise<void>;
|
|
106
|
+
/** The gated-request ledger, injectable for tests. Default chant's on `chant/lifecycle`. */
|
|
107
|
+
export interface GatedRequestLedger {
|
|
108
|
+
requestGate: typeof requestGate;
|
|
109
|
+
spendGatedRequest: typeof spendGatedRequest;
|
|
110
|
+
finishGatedRequest: typeof finishGatedRequest;
|
|
111
|
+
readGatedRequests: typeof readGatedRequests;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The time a request was first asked, so asking again binds the same
|
|
115
|
+
* digest: chant's digest covers `at`, and a run that asked anew each time
|
|
116
|
+
* would never meet the approval of the last one. The newest standing,
|
|
117
|
+
* unspent request with the same kind, subject, requester and fields gives
|
|
118
|
+
* its `at`; with none, `now`.
|
|
119
|
+
*/
|
|
120
|
+
export declare function requestedAt(op: string, request: Omit<GatedRequest, "at">, options?: {
|
|
121
|
+
now?: string;
|
|
122
|
+
cwd?: string;
|
|
123
|
+
ledger?: Pick<GatedRequestLedger, "readGatedRequests">;
|
|
124
|
+
}): Promise<string>;
|
|
125
|
+
/** The digest `requestGate` puts in `fields.proof` for an attachment. */
|
|
126
|
+
export declare const attachmentDigest: (attachment: string) => string;
|
|
127
|
+
export interface GatedStateOpInput {
|
|
128
|
+
op: string;
|
|
129
|
+
/** The request, less `at`, which {@link requestedAt} fills. */
|
|
130
|
+
request: Omit<GatedRequest, "at"> & {
|
|
131
|
+
at?: string;
|
|
132
|
+
};
|
|
133
|
+
rules: GatedRequestRules;
|
|
134
|
+
description?: string;
|
|
135
|
+
expiry?: string;
|
|
136
|
+
base?: string;
|
|
137
|
+
/** A document the request carries, such as a migration's proof; its digest joins the request. */
|
|
138
|
+
attachment?: string;
|
|
139
|
+
cwd?: string;
|
|
140
|
+
now?: string;
|
|
141
|
+
runId?: string;
|
|
142
|
+
commit?: string;
|
|
143
|
+
ledger?: GatedRequestLedger;
|
|
144
|
+
gates?: RequestGateInput["gates"];
|
|
145
|
+
/**
|
|
146
|
+
* A last check just before the spend, for a fact that can change while the
|
|
147
|
+
* request waited (a run that may hold the lock came back). A string refuses
|
|
148
|
+
* the operation with that reason, and the approval is not spent.
|
|
149
|
+
*/
|
|
150
|
+
beforeSpend?: () => Promise<string | undefined>;
|
|
151
|
+
}
|
|
152
|
+
/** How a gated operation ended. */
|
|
153
|
+
export type GatedStateOpResult<T> = Exclude<RequestGateResult, {
|
|
154
|
+
status: "approved";
|
|
155
|
+
}> | {
|
|
156
|
+
status: "held";
|
|
157
|
+
digest: string;
|
|
158
|
+
request: GatedRequest;
|
|
159
|
+
reason: string;
|
|
160
|
+
} | {
|
|
161
|
+
status: "done";
|
|
162
|
+
digest: string;
|
|
163
|
+
request: GatedRequest;
|
|
164
|
+
approvedBy: string;
|
|
165
|
+
output: T;
|
|
166
|
+
recorded: boolean;
|
|
167
|
+
} | {
|
|
168
|
+
status: "failed";
|
|
169
|
+
digest: string;
|
|
170
|
+
request: GatedRequest;
|
|
171
|
+
approvedBy: string;
|
|
172
|
+
error: Error;
|
|
173
|
+
recorded: boolean;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Run `act` once its request is approved: ask (or read) the request, spend
|
|
177
|
+
* the approval, act, and record how it ended. `act` returns its output and
|
|
178
|
+
* the flat facts that go on the finished line. A spend that cannot be pushed
|
|
179
|
+
* throws before `act` runs, so no approval acts twice. A finished line that
|
|
180
|
+
* cannot be written is reported as `recorded: false`; the act already ran.
|
|
181
|
+
*/
|
|
182
|
+
export declare function gatedStateOp<T>(input: GatedStateOpInput, act: (approved: {
|
|
183
|
+
digest: string;
|
|
184
|
+
request: GatedRequest;
|
|
185
|
+
approvedBy: string;
|
|
186
|
+
}) => Promise<{
|
|
187
|
+
output: T;
|
|
188
|
+
detail?: Record<string, string | number | boolean>;
|
|
189
|
+
}>): Promise<GatedStateOpResult<T>>;
|
|
190
|
+
/** The digest a request binds, for a caller that prints it before it asks. */
|
|
191
|
+
export declare const stateOpDigest: (op: string, request: GatedRequest) => string;
|
|
192
|
+
/** The step input the gated capabilities share: the root and the request's rules. */
|
|
193
|
+
interface GatedRootInput {
|
|
194
|
+
root: string;
|
|
195
|
+
/** The project's directory, where the ledger is and roots are found. Default the process's. */
|
|
196
|
+
cwd?: string;
|
|
197
|
+
/** The root's directory. Default `root` under the project. */
|
|
198
|
+
dir?: string;
|
|
199
|
+
binary?: string;
|
|
200
|
+
/** Who asks. Default the CI actor, else the user. */
|
|
201
|
+
by?: string;
|
|
202
|
+
/** Which approvals count. Default the ledger's. */
|
|
203
|
+
approval?: GatedRequestRules["mode"];
|
|
204
|
+
}
|
|
205
|
+
/** `terraform-state-unlock`: release one lock, by ID, under a gated request. */
|
|
206
|
+
export interface StateUnlockStepInput extends GatedRootInput {
|
|
207
|
+
id: string;
|
|
208
|
+
/** Where the lock is, as the record names it: the lock file, the lock object, the lease's blob. */
|
|
209
|
+
location: string;
|
|
210
|
+
}
|
|
211
|
+
/** `terraform-state-push`: write state files to their roots under one gated request whose attachment is the proof. */
|
|
212
|
+
export interface StatePushStepInput extends GatedRootInput {
|
|
213
|
+
files: Array<{
|
|
214
|
+
root: string;
|
|
215
|
+
dir?: string;
|
|
216
|
+
file: string;
|
|
217
|
+
lock?: boolean;
|
|
218
|
+
force?: boolean;
|
|
219
|
+
}>;
|
|
220
|
+
/** The proof the approval binds: what the push writes and why it is safe. */
|
|
221
|
+
proof: string;
|
|
222
|
+
}
|
|
223
|
+
/** `terraform-copy`: plan and apply a root's copy under its own backend settings. */
|
|
224
|
+
export interface CopyStepInput {
|
|
225
|
+
root: string;
|
|
226
|
+
cwd?: string;
|
|
227
|
+
dir?: string;
|
|
228
|
+
binary?: string;
|
|
229
|
+
backendConfig: Record<string, string>;
|
|
230
|
+
destroy?: boolean;
|
|
231
|
+
lockTimeout?: string | false;
|
|
232
|
+
}
|
|
233
|
+
export declare const terraformStateUnlockCapability: Capability<StateUnlockStepInput, {
|
|
234
|
+
root: string;
|
|
235
|
+
id: string;
|
|
236
|
+
}>;
|
|
237
|
+
export declare const terraformStatePushCapability: Capability<StatePushStepInput, {
|
|
238
|
+
roots: string[];
|
|
239
|
+
}>;
|
|
240
|
+
export declare const terraformCopyCapability: Capability<CopyStepInput, {
|
|
241
|
+
root: string;
|
|
242
|
+
planDigest: string;
|
|
243
|
+
}>;
|
|
244
|
+
/** The state operations' capabilities, for the plugin's registry. */
|
|
245
|
+
export declare const terraformStateOpCapabilities: readonly [Capability<StateUnlockStepInput, {
|
|
246
|
+
root: string;
|
|
247
|
+
id: string;
|
|
248
|
+
}>, Capability<StatePushStepInput, {
|
|
249
|
+
roots: string[];
|
|
250
|
+
}>, Capability<CopyStepInput, {
|
|
251
|
+
root: string;
|
|
252
|
+
planDigest: string;
|
|
253
|
+
}>];
|
|
254
|
+
export {};
|
|
255
|
+
//# sourceMappingURL=state-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-ops.d.ts","sourceRoot":"","sources":["../src/state-ops.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