@intentius/chant-lexicon-terraform 0.124.98 → 0.124.100
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__/capabilities/chant.config.d.ts +0 -1
- package/dist/__fixtures__/effective-topology/chant.config.d.ts +0 -1
- package/dist/__fixtures__/kind-type/chant.config.d.ts +0 -1
- package/dist/__fixtures__/pr-loop/estate.component.d.ts +0 -1
- package/dist/__fixtures__/report/generate.d.ts +0 -1
- package/dist/__fixtures__/search-roots/chant.config.d.ts +0 -1
- package/dist/__fixtures__/sensitive-default/chant.config.d.ts +0 -1
- package/dist/__fixtures__/terragrunt/affected-cases.d.ts +0 -1
- package/dist/__fixtures__/terragrunt/record.d.ts +0 -1
- package/dist/action-ops.d.ts +0 -1
- package/dist/applied-state.d.ts +0 -1
- package/dist/backend-config.d.ts +0 -1
- package/dist/behaviour/index.d.ts +0 -1
- package/dist/behaviour/kinds.d.ts +0 -1
- package/dist/behaviour/predict.d.ts +0 -1
- package/dist/behaviour/reference-catalog.d.ts +0 -1
- package/dist/behaviour/request.d.ts +0 -1
- package/dist/capabilities/adapter.d.ts +0 -1
- package/dist/capabilities/mapping.json +164 -164
- package/dist/change-set.d.ts +0 -1
- package/dist/changed-roots.d.ts +0 -1
- package/dist/chant-floors.d.ts +10 -9
- package/dist/chant-floors.js +10 -8
- package/dist/ci-setup.d.ts +0 -1
- package/dist/codegen/docs-cli.d.ts +0 -1
- package/dist/codegen/docs.d.ts +0 -1
- package/dist/codegen/generate-cli.d.ts +0 -1
- package/dist/codegen/generate.d.ts +0 -1
- package/dist/codegen/package.d.ts +0 -1
- package/dist/commands.d.ts +0 -1
- package/dist/components/capability-plugin.d.ts +0 -1
- package/dist/components/compose-group.d.ts +0 -1
- package/dist/components/placeholder-preview.d.ts +0 -1
- package/dist/components/release-inputs.d.ts +0 -1
- package/dist/components/trace-facts.d.ts +0 -1
- package/dist/compose/apply-events.d.ts +0 -1
- package/dist/compose/estate.d.ts +0 -1
- package/dist/compose/hcl.d.ts +0 -1
- package/dist/compose/module-address.d.ts +0 -1
- package/dist/compose/root.d.ts +0 -1
- package/dist/compose/run.d.ts +0 -1
- package/dist/compose/slice.d.ts +0 -1
- package/dist/compose/state-address.d.ts +0 -1
- package/dist/compose/state-merge.d.ts +0 -1
- package/dist/compose.d.ts +0 -1
- package/dist/composites/terraform-adopt-op.d.ts +0 -1
- package/dist/composites/terraform-apply-op.d.ts +0 -1
- package/dist/composites/terraform-pin-rollout-op.d.ts +0 -1
- package/dist/composites/terraform-watch-op.d.ts +0 -1
- package/dist/cone.d.ts +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/cost-hold.d.ts +0 -1
- package/dist/describe-resources.d.ts +0 -1
- package/dist/drift-read.d.ts +0 -1
- package/dist/drift-record.d.ts +0 -1
- package/dist/drift-rows.d.ts +0 -1
- package/dist/engine-runner.d.ts +0 -1
- package/dist/engine-timings.d.ts +0 -1
- package/dist/estate-migration.d.ts +0 -1
- package/dist/exit-codes.d.ts +0 -1
- package/dist/generated/index.d.ts +0 -1
- package/dist/hcl/descend.d.ts +0 -1
- package/dist/hcl/edges.d.ts +0 -1
- package/dist/hcl/evaluate.d.ts +0 -1
- package/dist/hcl/files.d.ts +0 -1
- package/dist/hcl/instances.d.ts +0 -1
- package/dist/hcl/jsonencode.d.ts +0 -1
- package/dist/hcl/marker.d.ts +0 -1
- package/dist/hcl/parse.d.ts +0 -1
- package/dist/hcl/redact.d.ts +0 -1
- package/dist/hcl/references.d.ts +0 -1
- package/dist/hcl/roots.d.ts +0 -1
- package/dist/hcl/suppressions.d.ts +0 -1
- package/dist/hcl/value.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/init-turn.d.ts +0 -1
- package/dist/integrity.json +2 -2
- package/dist/lint/audit-catalog.d.ts +0 -1
- package/dist/lint/audit-lineage.d.ts +0 -1
- package/dist/lint/post-synth/blocks.d.ts +0 -1
- package/dist/lint/post-synth/fixtures/load.d.ts +0 -1
- package/dist/lint/post-synth/flat-attributes.d.ts +0 -1
- package/dist/lint/post-synth/index.d.ts +0 -1
- package/dist/lint/post-synth/module-source.d.ts +0 -1
- package/dist/lint/post-synth/record-store.d.ts +0 -1
- package/dist/lint/post-synth/scope.d.ts +0 -1
- package/dist/lint/post-synth/terragrunt.d.ts +0 -1
- package/dist/lint/post-synth/tf001.d.ts +0 -1
- package/dist/lint/post-synth/tf002.d.ts +0 -1
- package/dist/lint/post-synth/tf003.d.ts +0 -1
- package/dist/lint/post-synth/tf004.d.ts +0 -1
- package/dist/lint/post-synth/tf005.d.ts +0 -1
- package/dist/lint/post-synth/tf006.d.ts +0 -1
- package/dist/lint/post-synth/tf007.d.ts +0 -1
- package/dist/lint/post-synth/tf008.d.ts +0 -1
- package/dist/lint/post-synth/tf009.d.ts +0 -1
- package/dist/lint/post-synth/tf010.d.ts +0 -1
- package/dist/lint/post-synth/tf011.d.ts +0 -1
- package/dist/lint/post-synth/tf012.d.ts +0 -1
- package/dist/lint/post-synth/tf013.d.ts +0 -1
- package/dist/lint/post-synth/tf014.d.ts +0 -1
- package/dist/lint/post-synth/tf015.d.ts +0 -1
- package/dist/lint/post-synth/tf016.d.ts +0 -1
- package/dist/lint/post-synth/tf017.d.ts +0 -1
- package/dist/lint/post-synth/tf018.d.ts +0 -1
- package/dist/lint/post-synth/tf019.d.ts +0 -1
- package/dist/lint/post-synth/tf020.d.ts +0 -1
- package/dist/lint/post-synth/tf021.d.ts +0 -1
- package/dist/lint/post-synth/tf022.d.ts +0 -1
- package/dist/lint/post-synth/tf024.d.ts +0 -1
- package/dist/lint/post-synth/tf025.d.ts +0 -1
- package/dist/lint/post-synth/tf026.d.ts +0 -1
- package/dist/lint/post-synth/tf027.d.ts +0 -1
- package/dist/lint/post-synth/tf028.d.ts +0 -1
- package/dist/lint/post-synth/tf029.d.ts +0 -1
- package/dist/lint/post-synth/tf030.d.ts +0 -1
- package/dist/lint/post-synth/tf031.d.ts +0 -1
- package/dist/lint/post-synth/tf032.d.ts +0 -1
- package/dist/lint/post-synth/tf033.d.ts +0 -1
- package/dist/lint/post-synth/tf034.d.ts +0 -1
- package/dist/lint/post-synth/tf035.d.ts +0 -1
- package/dist/lint/post-synth/tf036.d.ts +0 -1
- package/dist/lint/post-synth/tf037.d.ts +0 -1
- package/dist/lint/post-synth/tf038.d.ts +0 -1
- package/dist/lint/post-synth/tf039.d.ts +0 -1
- package/dist/lint/post-synth/tf040.d.ts +0 -1
- package/dist/lint/post-synth/tf041.d.ts +0 -1
- package/dist/lint/post-synth/tf042.d.ts +0 -1
- package/dist/lint/post-synth/tf043.d.ts +0 -1
- package/dist/lint/post-synth/tf044.d.ts +0 -1
- package/dist/lint/post-synth/tf045.d.ts +0 -1
- package/dist/lint/post-synth/tf046.d.ts +0 -1
- package/dist/lint/post-synth/tf047.d.ts +0 -1
- package/dist/lint/rules/fixtures/load.d.ts +0 -1
- package/dist/lint/rules/index.d.ts +0 -1
- package/dist/lint/rules/plan-before-apply.d.ts +0 -1
- package/dist/lint/secret-shape.d.ts +0 -1
- package/dist/live-ownership.d.ts +0 -1
- package/dist/live-plan-reasons.d.ts +0 -1
- package/dist/live-roots.d.ts +0 -1
- package/dist/lock-rows.d.ts +0 -1
- package/dist/lock-timeout.d.ts +0 -1
- package/dist/lsp/completions.d.ts +0 -1
- package/dist/lsp/context.d.ts +0 -1
- package/dist/lsp/hover.d.ts +0 -1
- package/dist/lsp/option-keys.d.ts +0 -1
- package/dist/manifest.json +1 -1
- package/dist/migration-history.d.ts +0 -1
- package/dist/module-catalog/index.d.ts +0 -1
- package/dist/module-catalog/refresh-cli.d.ts +0 -1
- package/dist/module-catalog/static-tier.d.ts +0 -1
- package/dist/module-catalog/types.d.ts +0 -1
- package/dist/op/activities/index.d.ts +0 -1
- package/dist/op/activities/live-detect.d.ts +0 -1
- package/dist/op/activities/pin-rollout.d.ts +0 -1
- package/dist/op/activities/terraform.d.ts +0 -1
- package/dist/op/activity-contracts.d.ts +0 -1
- package/dist/op/adoption.d.ts +0 -1
- package/dist/op/builders.d.ts +0 -1
- package/dist/op/command-hook.d.ts +0 -1
- package/dist/op/resolve-root-mode.d.ts +0 -1
- package/dist/package-cli.d.ts +0 -1
- package/dist/pin/consumers.d.ts +0 -1
- package/dist/pin/edit-ts.d.ts +0 -1
- package/dist/pin/edit.d.ts +0 -1
- package/dist/pin/forge.d.ts +0 -1
- package/dist/pin/index.d.ts +0 -1
- package/dist/pin/rollout.d.ts +0 -1
- package/dist/pin/scan.d.ts +0 -1
- package/dist/pin/source.d.ts +0 -1
- package/dist/pin/waves.d.ts +0 -1
- package/dist/plan-digest.d.ts +0 -1
- package/dist/plan-observation.d.ts +0 -1
- package/dist/plan-shape.d.ts +0 -1
- package/dist/plugin.d.ts +0 -1
- package/dist/pr-env.d.ts +0 -1
- package/dist/reach.d.ts +0 -1
- package/dist/registry/address.d.ts +0 -1
- package/dist/registry/catalog-read.d.ts +0 -1
- package/dist/registry/deprecated.d.ts +0 -1
- package/dist/registry/docs.d.ts +0 -1
- package/dist/registry/edge/edge.d.ts +0 -1
- package/dist/registry/edge/index.d.ts +0 -1
- package/dist/registry/edge/lambda-edge.d.ts +0 -1
- package/dist/registry/edge/sigv4-web.d.ts +0 -1
- package/dist/registry/edge/token-source.d.ts +0 -1
- package/dist/registry/edge/worker.d.ts +0 -1
- package/dist/registry/handler.d.ts +0 -1
- package/dist/registry/headers-file.d.ts +0 -1
- package/dist/registry/index.d.ts +0 -1
- package/dist/registry/mirror-paths.d.ts +0 -1
- package/dist/registry/mirror.d.ts +0 -1
- package/dist/registry/proxies.d.ts +0 -1
- package/dist/registry/reader.d.ts +0 -1
- package/dist/registry/semver.d.ts +0 -1
- package/dist/registry/serve.d.ts +0 -1
- package/dist/registry/source-forms.d.ts +0 -1
- package/dist/registry/targets/artifactory.d.ts +0 -1
- package/dist/registry/targets/fake-artifactory.d.ts +0 -1
- package/dist/registry/targets/fake-gitlab.d.ts +0 -1
- package/dist/registry/targets/fake-hcp.d.ts +0 -1
- package/dist/registry/targets/fake-http.d.ts +0 -1
- package/dist/registry/targets/fake-nexus.d.ts +0 -1
- package/dist/registry/targets/gitlab.d.ts +0 -1
- package/dist/registry/targets/hcp.d.ts +0 -1
- package/dist/registry/targets/hosted.d.ts +0 -1
- package/dist/registry/targets/index.d.ts +0 -1
- package/dist/registry/targets/module-target.d.ts +0 -1
- package/dist/registry/targets/nexus.d.ts +0 -1
- package/dist/registry/targets/zip.d.ts +0 -1
- package/dist/registry/writer.d.ts +0 -1
- package/dist/report.d.ts +0 -1
- package/dist/serializer.d.ts +0 -1
- package/dist/state/azure-blob.d.ts +0 -1
- package/dist/state/backend.d.ts +0 -1
- package/dist/state/exec.d.ts +0 -1
- package/dist/state/gcs.d.ts +0 -1
- package/dist/state/gitlab.d.ts +0 -1
- package/dist/state/index.d.ts +0 -1
- package/dist/state/locks.d.ts +0 -1
- package/dist/state/object-store.d.ts +0 -1
- package/dist/state/root-states.d.ts +0 -1
- package/dist/state/s3.d.ts +0 -1
- package/dist/state/source.d.ts +0 -1
- package/dist/state/store.d.ts +0 -1
- package/dist/state/versions.d.ts +0 -1
- package/dist/state-migration.d.ts +0 -1
- package/dist/state-ops.d.ts +0 -1
- package/dist/state-ownership.d.ts +0 -1
- package/dist/state-reads.d.ts +0 -1
- package/dist/template/index.d.ts +0 -1
- package/dist/template/render.d.ts +0 -1
- package/dist/terragrunt/affected.d.ts +0 -1
- package/dist/terragrunt/capability.d.ts +0 -1
- package/dist/terragrunt/index.d.ts +0 -1
- package/dist/terragrunt/mocks.d.ts +0 -1
- package/dist/terragrunt/place.d.ts +0 -1
- package/dist/terragrunt/run.d.ts +0 -1
- package/dist/terragrunt/units.d.ts +0 -1
- package/dist/terragrunt/wave.d.ts +0 -1
- package/dist/used-sources.d.ts +0 -1
- package/dist/validate-cli.d.ts +0 -1
- package/dist/validate.d.ts +0 -1
- package/package.json +15 -16
- package/dist/__fixtures__/capabilities/chant.config.d.ts.map +0 -1
- package/dist/__fixtures__/effective-topology/chant.config.d.ts.map +0 -1
- package/dist/__fixtures__/kind-type/chant.config.d.ts.map +0 -1
- package/dist/__fixtures__/pr-loop/estate.component.d.ts.map +0 -1
- package/dist/__fixtures__/report/generate.d.ts.map +0 -1
- package/dist/__fixtures__/search-roots/chant.config.d.ts.map +0 -1
- package/dist/__fixtures__/sensitive-default/chant.config.d.ts.map +0 -1
- package/dist/__fixtures__/terragrunt/affected-cases.d.ts.map +0 -1
- package/dist/__fixtures__/terragrunt/record.d.ts.map +0 -1
- package/dist/action-ops.d.ts.map +0 -1
- package/dist/applied-state.d.ts.map +0 -1
- package/dist/backend-config.d.ts.map +0 -1
- package/dist/behaviour/index.d.ts.map +0 -1
- package/dist/behaviour/kinds.d.ts.map +0 -1
- package/dist/behaviour/predict.d.ts.map +0 -1
- package/dist/behaviour/reference-catalog.d.ts.map +0 -1
- package/dist/behaviour/request.d.ts.map +0 -1
- package/dist/capabilities/adapter.d.ts.map +0 -1
- package/dist/change-set.d.ts.map +0 -1
- package/dist/changed-roots.d.ts.map +0 -1
- package/dist/chant-floors.d.ts.map +0 -1
- package/dist/ci-setup.d.ts.map +0 -1
- package/dist/codegen/docs-cli.d.ts.map +0 -1
- package/dist/codegen/docs.d.ts.map +0 -1
- package/dist/codegen/generate-cli.d.ts.map +0 -1
- package/dist/codegen/generate.d.ts.map +0 -1
- package/dist/codegen/package.d.ts.map +0 -1
- package/dist/commands.d.ts.map +0 -1
- package/dist/components/capability-plugin.d.ts.map +0 -1
- package/dist/components/compose-group.d.ts.map +0 -1
- package/dist/components/placeholder-preview.d.ts.map +0 -1
- package/dist/components/release-inputs.d.ts.map +0 -1
- package/dist/components/trace-facts.d.ts.map +0 -1
- package/dist/compose/apply-events.d.ts.map +0 -1
- package/dist/compose/estate.d.ts.map +0 -1
- package/dist/compose/hcl.d.ts.map +0 -1
- package/dist/compose/module-address.d.ts.map +0 -1
- package/dist/compose/root.d.ts.map +0 -1
- package/dist/compose/run.d.ts.map +0 -1
- package/dist/compose/slice.d.ts.map +0 -1
- package/dist/compose/state-address.d.ts.map +0 -1
- package/dist/compose/state-merge.d.ts.map +0 -1
- package/dist/compose.d.ts.map +0 -1
- package/dist/composites/terraform-adopt-op.d.ts.map +0 -1
- package/dist/composites/terraform-apply-op.d.ts.map +0 -1
- package/dist/composites/terraform-pin-rollout-op.d.ts.map +0 -1
- package/dist/composites/terraform-watch-op.d.ts.map +0 -1
- package/dist/cone.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/cost-hold.d.ts.map +0 -1
- package/dist/describe-resources.d.ts.map +0 -1
- package/dist/drift-read.d.ts.map +0 -1
- package/dist/drift-record.d.ts.map +0 -1
- package/dist/drift-rows.d.ts.map +0 -1
- package/dist/engine-runner.d.ts.map +0 -1
- package/dist/engine-timings.d.ts.map +0 -1
- package/dist/estate-migration.d.ts.map +0 -1
- package/dist/exit-codes.d.ts.map +0 -1
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/hcl/descend.d.ts.map +0 -1
- package/dist/hcl/edges.d.ts.map +0 -1
- package/dist/hcl/evaluate.d.ts.map +0 -1
- package/dist/hcl/files.d.ts.map +0 -1
- package/dist/hcl/instances.d.ts.map +0 -1
- package/dist/hcl/jsonencode.d.ts.map +0 -1
- package/dist/hcl/marker.d.ts.map +0 -1
- package/dist/hcl/parse.d.ts.map +0 -1
- package/dist/hcl/redact.d.ts.map +0 -1
- package/dist/hcl/references.d.ts.map +0 -1
- package/dist/hcl/roots.d.ts.map +0 -1
- package/dist/hcl/suppressions.d.ts.map +0 -1
- package/dist/hcl/value.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/init-turn.d.ts.map +0 -1
- package/dist/lint/audit-catalog.d.ts.map +0 -1
- package/dist/lint/audit-lineage.d.ts.map +0 -1
- package/dist/lint/post-synth/blocks.d.ts.map +0 -1
- package/dist/lint/post-synth/fixtures/load.d.ts.map +0 -1
- package/dist/lint/post-synth/flat-attributes.d.ts.map +0 -1
- package/dist/lint/post-synth/index.d.ts.map +0 -1
- package/dist/lint/post-synth/module-source.d.ts.map +0 -1
- package/dist/lint/post-synth/record-store.d.ts.map +0 -1
- package/dist/lint/post-synth/scope.d.ts.map +0 -1
- package/dist/lint/post-synth/terragrunt.d.ts.map +0 -1
- package/dist/lint/post-synth/tf001.d.ts.map +0 -1
- package/dist/lint/post-synth/tf002.d.ts.map +0 -1
- package/dist/lint/post-synth/tf003.d.ts.map +0 -1
- package/dist/lint/post-synth/tf004.d.ts.map +0 -1
- package/dist/lint/post-synth/tf005.d.ts.map +0 -1
- package/dist/lint/post-synth/tf006.d.ts.map +0 -1
- package/dist/lint/post-synth/tf007.d.ts.map +0 -1
- package/dist/lint/post-synth/tf008.d.ts.map +0 -1
- package/dist/lint/post-synth/tf009.d.ts.map +0 -1
- package/dist/lint/post-synth/tf010.d.ts.map +0 -1
- package/dist/lint/post-synth/tf011.d.ts.map +0 -1
- package/dist/lint/post-synth/tf012.d.ts.map +0 -1
- package/dist/lint/post-synth/tf013.d.ts.map +0 -1
- package/dist/lint/post-synth/tf014.d.ts.map +0 -1
- package/dist/lint/post-synth/tf015.d.ts.map +0 -1
- package/dist/lint/post-synth/tf016.d.ts.map +0 -1
- package/dist/lint/post-synth/tf017.d.ts.map +0 -1
- package/dist/lint/post-synth/tf018.d.ts.map +0 -1
- package/dist/lint/post-synth/tf019.d.ts.map +0 -1
- package/dist/lint/post-synth/tf020.d.ts.map +0 -1
- package/dist/lint/post-synth/tf021.d.ts.map +0 -1
- package/dist/lint/post-synth/tf022.d.ts.map +0 -1
- package/dist/lint/post-synth/tf024.d.ts.map +0 -1
- package/dist/lint/post-synth/tf025.d.ts.map +0 -1
- package/dist/lint/post-synth/tf026.d.ts.map +0 -1
- package/dist/lint/post-synth/tf027.d.ts.map +0 -1
- package/dist/lint/post-synth/tf028.d.ts.map +0 -1
- package/dist/lint/post-synth/tf029.d.ts.map +0 -1
- package/dist/lint/post-synth/tf030.d.ts.map +0 -1
- package/dist/lint/post-synth/tf031.d.ts.map +0 -1
- package/dist/lint/post-synth/tf032.d.ts.map +0 -1
- package/dist/lint/post-synth/tf033.d.ts.map +0 -1
- package/dist/lint/post-synth/tf034.d.ts.map +0 -1
- package/dist/lint/post-synth/tf035.d.ts.map +0 -1
- package/dist/lint/post-synth/tf036.d.ts.map +0 -1
- package/dist/lint/post-synth/tf037.d.ts.map +0 -1
- package/dist/lint/post-synth/tf038.d.ts.map +0 -1
- package/dist/lint/post-synth/tf039.d.ts.map +0 -1
- package/dist/lint/post-synth/tf040.d.ts.map +0 -1
- package/dist/lint/post-synth/tf041.d.ts.map +0 -1
- package/dist/lint/post-synth/tf042.d.ts.map +0 -1
- package/dist/lint/post-synth/tf043.d.ts.map +0 -1
- package/dist/lint/post-synth/tf044.d.ts.map +0 -1
- package/dist/lint/post-synth/tf045.d.ts.map +0 -1
- package/dist/lint/post-synth/tf046.d.ts.map +0 -1
- package/dist/lint/post-synth/tf047.d.ts.map +0 -1
- package/dist/lint/rules/fixtures/load.d.ts.map +0 -1
- package/dist/lint/rules/index.d.ts.map +0 -1
- package/dist/lint/rules/plan-before-apply.d.ts.map +0 -1
- package/dist/lint/secret-shape.d.ts.map +0 -1
- package/dist/live-ownership.d.ts.map +0 -1
- package/dist/live-plan-reasons.d.ts.map +0 -1
- package/dist/live-roots.d.ts.map +0 -1
- package/dist/lock-rows.d.ts.map +0 -1
- package/dist/lock-timeout.d.ts.map +0 -1
- package/dist/lsp/completions.d.ts.map +0 -1
- package/dist/lsp/context.d.ts.map +0 -1
- package/dist/lsp/hover.d.ts.map +0 -1
- package/dist/lsp/option-keys.d.ts.map +0 -1
- package/dist/migration-history.d.ts.map +0 -1
- package/dist/module-catalog/index.d.ts.map +0 -1
- package/dist/module-catalog/refresh-cli.d.ts.map +0 -1
- package/dist/module-catalog/static-tier.d.ts.map +0 -1
- package/dist/module-catalog/types.d.ts.map +0 -1
- package/dist/op/activities/index.d.ts.map +0 -1
- package/dist/op/activities/live-detect.d.ts.map +0 -1
- package/dist/op/activities/pin-rollout.d.ts.map +0 -1
- package/dist/op/activities/terraform.d.ts.map +0 -1
- package/dist/op/activity-contracts.d.ts.map +0 -1
- package/dist/op/adoption.d.ts.map +0 -1
- package/dist/op/builders.d.ts.map +0 -1
- package/dist/op/command-hook.d.ts.map +0 -1
- package/dist/op/resolve-root-mode.d.ts.map +0 -1
- package/dist/package-cli.d.ts.map +0 -1
- package/dist/pin/consumers.d.ts.map +0 -1
- package/dist/pin/edit-ts.d.ts.map +0 -1
- package/dist/pin/edit.d.ts.map +0 -1
- package/dist/pin/forge.d.ts.map +0 -1
- package/dist/pin/index.d.ts.map +0 -1
- package/dist/pin/rollout.d.ts.map +0 -1
- package/dist/pin/scan.d.ts.map +0 -1
- package/dist/pin/source.d.ts.map +0 -1
- package/dist/pin/waves.d.ts.map +0 -1
- package/dist/plan-digest.d.ts.map +0 -1
- package/dist/plan-observation.d.ts.map +0 -1
- package/dist/plan-shape.d.ts.map +0 -1
- package/dist/plugin.d.ts.map +0 -1
- package/dist/pr-env.d.ts.map +0 -1
- package/dist/reach.d.ts.map +0 -1
- package/dist/registry/address.d.ts.map +0 -1
- package/dist/registry/catalog-read.d.ts.map +0 -1
- package/dist/registry/deprecated.d.ts.map +0 -1
- package/dist/registry/docs.d.ts.map +0 -1
- package/dist/registry/edge/edge.d.ts.map +0 -1
- package/dist/registry/edge/index.d.ts.map +0 -1
- package/dist/registry/edge/lambda-edge.d.ts.map +0 -1
- package/dist/registry/edge/sigv4-web.d.ts.map +0 -1
- package/dist/registry/edge/token-source.d.ts.map +0 -1
- package/dist/registry/edge/worker.d.ts.map +0 -1
- package/dist/registry/handler.d.ts.map +0 -1
- package/dist/registry/headers-file.d.ts.map +0 -1
- package/dist/registry/index.d.ts.map +0 -1
- package/dist/registry/mirror-paths.d.ts.map +0 -1
- package/dist/registry/mirror.d.ts.map +0 -1
- package/dist/registry/proxies.d.ts.map +0 -1
- package/dist/registry/reader.d.ts.map +0 -1
- package/dist/registry/semver.d.ts.map +0 -1
- package/dist/registry/serve.d.ts.map +0 -1
- package/dist/registry/source-forms.d.ts.map +0 -1
- package/dist/registry/targets/artifactory.d.ts.map +0 -1
- package/dist/registry/targets/fake-artifactory.d.ts.map +0 -1
- package/dist/registry/targets/fake-gitlab.d.ts.map +0 -1
- package/dist/registry/targets/fake-hcp.d.ts.map +0 -1
- package/dist/registry/targets/fake-http.d.ts.map +0 -1
- package/dist/registry/targets/fake-nexus.d.ts.map +0 -1
- package/dist/registry/targets/gitlab.d.ts.map +0 -1
- package/dist/registry/targets/hcp.d.ts.map +0 -1
- package/dist/registry/targets/hosted.d.ts.map +0 -1
- package/dist/registry/targets/index.d.ts.map +0 -1
- package/dist/registry/targets/module-target.d.ts.map +0 -1
- package/dist/registry/targets/nexus.d.ts.map +0 -1
- package/dist/registry/targets/zip.d.ts.map +0 -1
- package/dist/registry/writer.d.ts.map +0 -1
- package/dist/report.d.ts.map +0 -1
- package/dist/serializer.d.ts.map +0 -1
- package/dist/state/azure-blob.d.ts.map +0 -1
- package/dist/state/backend.d.ts.map +0 -1
- package/dist/state/exec.d.ts.map +0 -1
- package/dist/state/gcs.d.ts.map +0 -1
- package/dist/state/gitlab.d.ts.map +0 -1
- package/dist/state/index.d.ts.map +0 -1
- package/dist/state/locks.d.ts.map +0 -1
- package/dist/state/object-store.d.ts.map +0 -1
- package/dist/state/root-states.d.ts.map +0 -1
- package/dist/state/s3.d.ts.map +0 -1
- package/dist/state/source.d.ts.map +0 -1
- package/dist/state/store.d.ts.map +0 -1
- package/dist/state/versions.d.ts.map +0 -1
- package/dist/state-migration.d.ts.map +0 -1
- package/dist/state-ops.d.ts.map +0 -1
- package/dist/state-ownership.d.ts.map +0 -1
- package/dist/state-reads.d.ts.map +0 -1
- package/dist/template/index.d.ts.map +0 -1
- package/dist/template/render.d.ts.map +0 -1
- package/dist/terragrunt/affected.d.ts.map +0 -1
- package/dist/terragrunt/capability.d.ts.map +0 -1
- package/dist/terragrunt/index.d.ts.map +0 -1
- package/dist/terragrunt/mocks.d.ts.map +0 -1
- package/dist/terragrunt/place.d.ts.map +0 -1
- package/dist/terragrunt/run.d.ts.map +0 -1
- package/dist/terragrunt/units.d.ts.map +0 -1
- package/dist/terragrunt/wave.d.ts.map +0 -1
- package/dist/used-sources.d.ts.map +0 -1
- package/dist/validate-cli.d.ts.map +0 -1
- package/dist/validate.d.ts.map +0 -1
- package/src/__fixtures__/ACCEPTANCE.md +0 -370
- package/src/__fixtures__/capabilities/catalog/main.tf +0 -105
- package/src/__fixtures__/capabilities/chant.config.ts +0 -15
- package/src/__fixtures__/capabilities/findings/main.tf +0 -225
- package/src/__fixtures__/capabilities/ledger/main.tf +0 -265
- package/src/__fixtures__/capabilities/package.json +0 -1
- package/src/__fixtures__/change-set/choudoufu-set-plan.change-set.golden.json +0 -95
- package/src/__fixtures__/change-set/choudoufu-set-plan.json +0 -76
- package/src/__fixtures__/change-set/choudoufu.part.golden.json +0 -173
- package/src/__fixtures__/change-set/choudoufu.plan.json +0 -610
- package/src/__fixtures__/change-set/terraform.import-forget.plan.json +0 -81
- package/src/__fixtures__/change-set/terraform.part.golden.json +0 -173
- package/src/__fixtures__/change-set/terraform.plan.json +0 -589
- package/src/__fixtures__/change-set/tofu.part.golden.json +0 -173
- package/src/__fixtures__/change-set/tofu.plan.json +0 -588
- package/src/__fixtures__/change-set/v1.tf.txt +0 -21
- package/src/__fixtures__/change-set/v2-module-app.tf.txt +0 -4
- package/src/__fixtures__/change-set/v2.tf.txt +0 -21
- package/src/__fixtures__/compose/apply-failed-in-app.jsonl +0 -12
- package/src/__fixtures__/compose/state-app.json +0 -66
- package/src/__fixtures__/compose/state-edge.json +0 -40
- package/src/__fixtures__/compose/state-net.json +0 -58
- package/src/__fixtures__/compose/three-app.plan.json +0 -184
- package/src/__fixtures__/compose/three-composed.plan.json +0 -509
- package/src/__fixtures__/compose/three-edge.plan.json +0 -144
- package/src/__fixtures__/compose/three-net.plan.json +0 -174
- package/src/__fixtures__/compose/unknown-composed.plan.json +0 -228
- package/src/__fixtures__/compose/working-after-apply.json +0 -145
- package/src/__fixtures__/config-blocks/app/main.tf +0 -61
- package/src/__fixtures__/config-blocks/app/modules/network/main.tf +0 -4
- package/src/__fixtures__/config-blocks/app-json/main.tf.json +0 -39
- package/src/__fixtures__/config-files/shadow/main.tf +0 -3
- package/src/__fixtures__/config-files/shadow/main.tofu +0 -3
- package/src/__fixtures__/config-files/shadow/other.tf +0 -3
- package/src/__fixtures__/config-files/tf/main.tf +0 -11
- package/src/__fixtures__/config-files/tf-json/main.tf.json +0 -18
- package/src/__fixtures__/config-files/tofu/main.tofu +0 -11
- package/src/__fixtures__/config-files/tofu-json/main.tofu.json +0 -18
- package/src/__fixtures__/config-files/tofu-only/main.tofu +0 -3
- package/src/__fixtures__/drift-record/README.md +0 -16
- package/src/__fixtures__/drift-record/live-plan-sections.json +0 -27
- package/src/__fixtures__/drift-rows/live-root-plan.json +0 -70
- package/src/__fixtures__/drift-rows/refresh-plan-module.json +0 -48
- package/src/__fixtures__/drift-rows/refresh-plan.json +0 -61
- package/src/__fixtures__/effective-topology/chant.config.ts +0 -11
- package/src/__fixtures__/effective-topology/net/main.tf +0 -176
- package/src/__fixtures__/effective-topology/package.json +0 -6
- package/src/__fixtures__/graph-roots/README.md +0 -21
- package/src/__fixtures__/graph-roots/app/main.tf +0 -41
- package/src/__fixtures__/graph-roots/app/modules/cdn/main.tf +0 -7
- package/src/__fixtures__/graph-roots/network/main.tf +0 -16
- package/src/__fixtures__/instance-forms/app/main.tf +0 -110
- package/src/__fixtures__/instance-forms/app/modules/svc/main.tf +0 -3
- package/src/__fixtures__/instance-vars/app/main.tf +0 -52
- package/src/__fixtures__/instance-vars/app/modules/app/main.tf +0 -12
- package/src/__fixtures__/instance-vars/app/modules/edge/main.tf +0 -3
- package/src/__fixtures__/instance-vars/app/terraform.tfvars +0 -1
- package/src/__fixtures__/kind-type/app/main.tf +0 -35
- package/src/__fixtures__/kind-type/chant.config.ts +0 -11
- package/src/__fixtures__/kind-type/package.json +0 -6
- package/src/__fixtures__/live/main.tf +0 -28
- package/src/__fixtures__/live-adopt/estate.chdf.hcl +0 -6
- package/src/__fixtures__/live-adopt/main.tf +0 -21
- package/src/__fixtures__/live-estate/README.md +0 -104
- package/src/__fixtures__/live-estate/adoptable.tf +0 -13
- package/src/__fixtures__/live-estate/compute.tf +0 -10
- package/src/__fixtures__/live-estate/estate.chdf.hcl +0 -1
- package/src/__fixtures__/live-estate/logs.tf +0 -8
- package/src/__fixtures__/live-estate/network.tf +0 -24
- package/src/__fixtures__/live-estate/rule.tf +0 -11
- package/src/__fixtures__/live-estate/unowned.tf +0 -21
- package/src/__fixtures__/live-estate/versions.tf +0 -31
- package/src/__fixtures__/live-ls.json +0 -98
- package/src/__fixtures__/live-module-keyed/live-graph.json +0 -259
- package/src/__fixtures__/live-module-keyed/live-plan.json +0 -87
- package/src/__fixtures__/live-module-keyed/root/estate.chdf.hcl +0 -1
- package/src/__fixtures__/live-module-keyed/root/main.tf +0 -21
- package/src/__fixtures__/live-module-keyed/root/modules/app/main.tf +0 -17
- package/src/__fixtures__/live-module-keyed/root/modules/edge/main.tf +0 -7
- package/src/__fixtures__/live-module-keyed/root/versions.tf +0 -30
- package/src/__fixtures__/live-module-keyed/show-state.json +0 -146
- package/src/__fixtures__/live-plan-depth/README.md +0 -59
- package/src/__fixtures__/live-plan-depth/live-plan.json +0 -110
- package/src/__fixtures__/live-plan-depth/show-plan-sensitive.json +0 -1
- package/src/__fixtures__/live-plan-depth/show-plan.json +0 -1
- package/src/__fixtures__/live-plan.json +0 -317
- package/src/__fixtures__/live-sidecar/estate.chdf.hcl +0 -3
- package/src/__fixtures__/live-sidecar/main.tf +0 -24
- package/src/__fixtures__/module-tree/README.md +0 -16
- package/src/__fixtures__/module-tree/cycle/main.tf +0 -3
- package/src/__fixtures__/module-tree/cycle/modules/a/main.tf +0 -9
- package/src/__fixtures__/module-tree/cycle/modules/b/main.tf +0 -9
- package/src/__fixtures__/module-tree/missing/main.tf +0 -9
- package/src/__fixtures__/module-tree/outside/root/main.tf +0 -9
- package/src/__fixtures__/module-tree/root/main.tf +0 -28
- package/src/__fixtures__/module-tree/root/modules/cdn/main.tf +0 -15
- package/src/__fixtures__/module-tree/root/modules/cdn/modules/bucket/main.tf +0 -11
- package/src/__fixtures__/module-tree/shared/main.tf +0 -5
- package/src/__fixtures__/no-backend/main.tf +0 -24
- package/src/__fixtures__/pin/choudoufu-live-waves-n5.json +0 -83
- package/src/__fixtures__/pin/largeset-oci-n5/apply-order.txt +0 -5
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/estate.chdf.hcl +0 -6
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e01/main.tf +0 -33
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/estate.chdf.hcl +0 -6
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e02/main.tf +0 -45
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/estate.chdf.hcl +0 -6
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e03/main.tf +0 -47
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/estate.chdf.hcl +0 -6
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e04/main.tf +0 -31
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/estate.chdf.hcl +0 -6
- package/src/__fixtures__/pin/largeset-oci-n5/estates/e05/main.tf +0 -27
- package/src/__fixtures__/pin/largeset-oci-n5/fixture.json +0 -77
- package/src/__fixtures__/plan-read/main.tf +0 -46
- package/src/__fixtures__/plan-read/next.tfvars +0 -1
- package/src/__fixtures__/plan-read-drift/README.md +0 -33
- package/src/__fixtures__/plan-read-drift/main.tf +0 -63
- package/src/__fixtures__/plan-read-drift/next.tfvars +0 -1
- package/src/__fixtures__/plan-summary/largeset-n5-bump.json +0 -2071
- package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.json +0 -95
- package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.md +0 -22
- package/src/__fixtures__/plan-summary/largeset-n5.summary.golden.txt +0 -12
- package/src/__fixtures__/pr-loop/README.md +0 -50
- package/src/__fixtures__/pr-loop/chant.config.json +0 -13
- package/src/__fixtures__/pr-loop/estate.component.ts +0 -10
- package/src/__fixtures__/pr-loop/roots/a/main.tf +0 -11
- package/src/__fixtures__/pr-loop/roots/app/main.tf +0 -19
- package/src/__fixtures__/pr-loop/roots/b/main.tf +0 -7
- package/src/__fixtures__/pr-loop/roots/dns/main.tf +0 -3
- package/src/__fixtures__/pr-loop/roots/net/main.tf +0 -7
- package/src/__fixtures__/references/main.tf +0 -56
- package/src/__fixtures__/remote-backend/main.tf +0 -34
- package/src/__fixtures__/report/applied.show.json +0 -51
- package/src/__fixtures__/report/generate.ts +0 -63
- package/src/__fixtures__/report/plan.show.json +0 -200
- package/src/__fixtures__/report/tf-apply/change-set.json +0 -170
- package/src/__fixtures__/report/tf-apply/report.json +0 -338
- package/src/__fixtures__/report/tf-plan/change-set.json +0 -170
- package/src/__fixtures__/report/tf-plan/report.json +0 -320
- package/src/__fixtures__/resolved-arguments/build-trusted/extras.tf +0 -28
- package/src/__fixtures__/resolved-arguments/build-trusted/main.tf +0 -22
- package/src/__fixtures__/resolved-arguments/build-trusted/serviceaccounts.tf +0 -26
- package/src/__fixtures__/resolved-arguments/modules/gke-cluster/main.tf +0 -15
- package/src/__fixtures__/resolved-arguments/modules/gke-cluster/variables.tf +0 -12
- package/src/__fixtures__/resolved-arguments/modules/gke-project/main.tf +0 -9
- package/src/__fixtures__/resolved-arguments/modules/gke-project/outputs.tf +0 -9
- package/src/__fixtures__/resolved-arguments/modules/gke-project/variables.tf +0 -7
- package/src/__fixtures__/resolved-arguments/modules/workload-identity-service-account/main.tf +0 -16
- package/src/__fixtures__/resolved-arguments/modules/workload-identity-service-account/outputs.tf +0 -4
- package/src/__fixtures__/resolved-arguments/modules/workload-identity-service-account/variables.tf +0 -21
- package/src/__fixtures__/search-roots/chant.config.ts +0 -11
- package/src/__fixtures__/search-roots/net/main.tf +0 -73
- package/src/__fixtures__/search-roots/package.json +0 -6
- package/src/__fixtures__/sensitive-default/chant.config.ts +0 -11
- package/src/__fixtures__/sensitive-default/net/main.tf +0 -38
- package/src/__fixtures__/sensitive-default/package.json +0 -6
- package/src/__fixtures__/show-plan.json +0 -663
- package/src/__fixtures__/show-state.json +0 -68
- package/src/__fixtures__/terragrunt/affected/catalog/units/web/terragrunt.hcl +0 -3
- package/src/__fixtures__/terragrunt/affected/gitignore +0 -3
- package/src/__fixtures__/terragrunt/affected/live/dev/app/terragrunt.hcl +0 -3
- package/src/__fixtures__/terragrunt/affected/live/dev/vpc/terragrunt.hcl +0 -3
- package/src/__fixtures__/terragrunt/affected/live/prod/app/terragrunt.hcl +0 -3
- package/src/__fixtures__/terragrunt/affected/live/stg/terragrunt.stack.hcl +0 -5
- package/src/__fixtures__/terragrunt/affected/modules/app/main.tf +0 -6
- package/src/__fixtures__/terragrunt/affected/modules/app/policy.json +0 -1
- package/src/__fixtures__/terragrunt/affected/modules/net/main.tf +0 -2
- package/src/__fixtures__/terragrunt/affected/modules/thing/main.tf +0 -3
- package/src/__fixtures__/terragrunt/affected/root.hcl +0 -5
- package/src/__fixtures__/terragrunt/affected-cases.ts +0 -126
- package/src/__fixtures__/terragrunt/five-units/catalog/units/thing/terragrunt.hcl +0 -3
- package/src/__fixtures__/terragrunt/five-units/live/dev/app/terragrunt.hcl +0 -13
- package/src/__fixtures__/terragrunt/five-units/live/dev/db/terragrunt.hcl +0 -8
- package/src/__fixtures__/terragrunt/five-units/live/dev/vpc/terragrunt.hcl +0 -3
- package/src/__fixtures__/terragrunt/five-units/live/prod/app/terragrunt.hcl +0 -8
- package/src/__fixtures__/terragrunt/five-units/live/prod/vpc/terragrunt.hcl +0 -3
- package/src/__fixtures__/terragrunt/five-units/modules/thing/main.tf +0 -7
- package/src/__fixtures__/terragrunt/five-units/root.hcl +0 -5
- package/src/__fixtures__/terragrunt/record.ts +0 -56
- package/src/__fixtures__/terragrunt/recorded/affected-find.json +0 -50
- package/src/__fixtures__/terragrunt/recorded/failed-plan-report.json +0 -36
- package/src/__fixtures__/terragrunt/recorded/find.json +0 -67
- package/src/__fixtures__/terragrunt/recorded/version.txt +0 -1
- package/src/__fixtures__/terragrunt/recorded/wave-1/apply-report.json +0 -22
- package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/dev/vpc/tfplan.json +0 -1
- package/src/__fixtures__/terragrunt/recorded/wave-1/json/live/prod/vpc/tfplan.json +0 -1
- package/src/__fixtures__/terragrunt/recorded/wave-1/plan-report.json +0 -22
- package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/dev/db/tfplan.json +0 -1
- package/src/__fixtures__/terragrunt/recorded/wave-2/json/live/prod/app/tfplan.json +0 -1
- package/src/__fixtures__/terragrunt/recorded/wave-2/plan-report.json +0 -22
- package/src/__fixtures__/three-cloud-azure.graph.json +0 -290
- package/src/__fixtures__/used-sources/root/extra.tofu +0 -1
- package/src/__fixtures__/used-sources/root/main.tf +0 -31
- package/src/__fixtures__/used-sources/root/modules/net/main.tf +0 -14
- package/src/__fixtures__/used-sources/root/modules/net/versions.tf.json +0 -7
- package/src/__fixtures__/used-sources/unit/terragrunt.hcl +0 -3
- package/src/__fixtures__/with-backend/main.tf +0 -35
- package/src/__fixtures__/with-module/main.tf +0 -49
- package/src/__fixtures__/with-module/modules/inner/main.tf +0 -5
- package/src/action-ops.test.ts +0 -293
- package/src/action-ops.ts +0 -372
- package/src/applied-state.ts +0 -52
- package/src/backend-config.test.ts +0 -105
- package/src/backend-config.ts +0 -133
- package/src/behaviour/index.ts +0 -32
- package/src/behaviour/kinds.ts +0 -209
- package/src/behaviour/predict.test.ts +0 -549
- package/src/behaviour/predict.ts +0 -391
- package/src/behaviour/reference-catalog.plugin.test.ts +0 -164
- package/src/behaviour/reference-catalog.ts +0 -349
- package/src/behaviour/request.test.ts +0 -359
- package/src/behaviour/request.ts +0 -624
- package/src/capabilities/adapter.ts +0 -32
- package/src/capabilities/mapping.json +0 -166
- package/src/capabilities-workspace.e2e.test.ts +0 -251
- package/src/capabilities.test.ts +0 -264
- package/src/change-set-combined-run.test.ts +0 -157
- package/src/change-set-instances.test.ts +0 -98
- package/src/change-set.test.ts +0 -177
- package/src/change-set.ts +0 -292
- package/src/changed-roots.test.ts +0 -84
- package/src/changed-roots.ts +0 -100
- package/src/chant-floors.ts +0 -32
- package/src/ci-setup.test.ts +0 -20
- package/src/ci-setup.ts +0 -47
- package/src/codegen/docs-cli.ts +0 -4
- package/src/codegen/docs.ts +0 -50
- package/src/codegen/generate-cli.ts +0 -10
- package/src/codegen/generate.ts +0 -68
- package/src/codegen/lint-rules-page.test.ts +0 -45
- package/src/codegen/package.ts +0 -50
- package/src/commands.ts +0 -192
- package/src/components/capability-plugin.test.ts +0 -548
- package/src/components/capability-plugin.ts +0 -921
- package/src/components/change-set-graph.e2e.test.ts +0 -90
- package/src/components/compose-group.test.ts +0 -515
- package/src/components/compose-group.ts +0 -497
- package/src/components/compose-op-wave.test.ts +0 -134
- package/src/components/demo-composed-roots.e2e.test.ts +0 -440
- package/src/components/member-outputs.test.ts +0 -76
- package/src/components/placeholder-preview.test.ts +0 -147
- package/src/components/placeholder-preview.ts +0 -257
- package/src/components/pr-loop-compose.tofu.e2e.test.ts +0 -363
- package/src/components/pr-loop.tofu.test.ts +0 -384
- package/src/components/release-inputs.ts +0 -69
- package/src/components/terraform-apply-command-hook.test.ts +0 -200
- package/src/components/terraform-apply-op-wave.test.ts +0 -295
- package/src/components/terraform-apply-parallel.test.ts +0 -158
- package/src/components/trace-facts.test.ts +0 -21
- package/src/components/trace-facts.ts +0 -27
- package/src/compose/apply-events.test.ts +0 -62
- package/src/compose/apply-events.ts +0 -100
- package/src/compose/estate.choudoufu.e2e.test.ts +0 -112
- package/src/compose/estate.test.ts +0 -421
- package/src/compose/estate.ts +0 -443
- package/src/compose/hcl.ts +0 -311
- package/src/compose/module-address.ts +0 -49
- package/src/compose/root.test.ts +0 -416
- package/src/compose/root.ts +0 -592
- package/src/compose/run.test.ts +0 -440
- package/src/compose/run.tofu.test.ts +0 -176
- package/src/compose/run.ts +0 -527
- package/src/compose/slice.test.ts +0 -184
- package/src/compose/slice.ts +0 -290
- package/src/compose/state-address.ts +0 -157
- package/src/compose/state-merge.test.ts +0 -131
- package/src/compose/state-merge.ts +0 -148
- package/src/compose.test.ts +0 -248
- package/src/compose.ts +0 -628
- package/src/composites/terraform-adopt-op.acceptance.test.ts +0 -244
- package/src/composites/terraform-adopt-op.test.ts +0 -203
- package/src/composites/terraform-adopt-op.ts +0 -225
- package/src/composites/terraform-apply-op.acceptance.test.ts +0 -323
- package/src/composites/terraform-apply-op.test.ts +0 -400
- package/src/composites/terraform-apply-op.ts +0 -291
- package/src/composites/terraform-pin-rollout-op.test.ts +0 -69
- package/src/composites/terraform-pin-rollout-op.ts +0 -60
- package/src/composites/terraform-watch-op.test.ts +0 -338
- package/src/composites/terraform-watch-op.ts +0 -322
- package/src/cone.ts +0 -138
- package/src/config-file-listers.test.ts +0 -265
- package/src/config.ts +0 -213
- package/src/cost-hold.ts +0 -29
- package/src/describe-resources.engine-facts.test.ts +0 -411
- package/src/describe-resources.live-module-keyed.test.ts +0 -290
- package/src/describe-resources.live-plan.test.ts +0 -302
- package/src/describe-resources.live-root-unchanged.test.ts +0 -126
- package/src/describe-resources.live.test.ts +0 -670
- package/src/describe-resources.plan.test.ts +0 -437
- package/src/describe-resources.test.ts +0 -430
- package/src/describe-resources.ts +0 -1996
- package/src/drift-read.ts +0 -284
- package/src/drift-record.test.ts +0 -285
- package/src/drift-record.ts +0 -513
- package/src/drift-rows.test.ts +0 -224
- package/src/drift-rows.ts +0 -208
- package/src/effective-topology.test.ts +0 -134
- package/src/engine-runner.test.ts +0 -347
- package/src/engine-runner.ts +0 -201
- package/src/engine-timings.test.ts +0 -203
- package/src/engine-timings.ts +0 -718
- package/src/estate-migration.test.ts +0 -186
- package/src/estate-migration.ts +0 -563
- package/src/exit-codes.test.ts +0 -23
- package/src/exit-codes.ts +0 -59
- package/src/generated/index.d.ts +0 -2
- package/src/generated/index.ts +0 -4
- package/src/hcl/config-blocks.test.ts +0 -174
- package/src/hcl/descend.test.ts +0 -202
- package/src/hcl/descend.ts +0 -286
- package/src/hcl/edges.test.ts +0 -207
- package/src/hcl/edges.ts +0 -336
- package/src/hcl/evaluate.test.ts +0 -215
- package/src/hcl/evaluate.ts +0 -899
- package/src/hcl/files.ts +0 -234
- package/src/hcl/instance-forms.test.ts +0 -94
- package/src/hcl/instances.test.ts +0 -137
- package/src/hcl/instances.ts +0 -508
- package/src/hcl/jsonencode.test.ts +0 -226
- package/src/hcl/jsonencode.ts +0 -454
- package/src/hcl/marker.test.ts +0 -147
- package/src/hcl/marker.ts +0 -235
- package/src/hcl/parse.test.ts +0 -250
- package/src/hcl/parse.ts +0 -812
- package/src/hcl/redact.ts +0 -185
- package/src/hcl/references.test.ts +0 -184
- package/src/hcl/references.ts +0 -188
- package/src/hcl/roots.ts +0 -148
- package/src/hcl/suppressions.test.ts +0 -147
- package/src/hcl/suppressions.ts +0 -216
- package/src/hcl/value.test.ts +0 -73
- package/src/hcl/value.ts +0 -106
- package/src/index.ts +0 -218
- package/src/init-turn.ts +0 -36
- package/src/lint/audit-catalog.ts +0 -584
- package/src/lint/audit-lineage.ts +0 -570
- package/src/lint/audit.test.ts +0 -254
- package/src/lint/post-synth/blocks.ts +0 -109
- package/src/lint/post-synth/estate-2284.test.ts +0 -68
- package/src/lint/post-synth/fixtures/TF001/negative-cloud.tf +0 -28
- package/src/lint/post-synth/fixtures/TF001/negative-second-block.tf +0 -17
- package/src/lint/post-synth/fixtures/TF001/negative.tf +0 -30
- package/src/lint/post-synth/fixtures/TF001/positive-local.tf +0 -31
- package/src/lint/post-synth/fixtures/TF001/positive.tf +0 -24
- package/src/lint/post-synth/fixtures/TF002/module-cycle/cdn/back/main.tf +0 -3
- package/src/lint/post-synth/fixtures/TF002/module-cycle/cdn/main.tf +0 -3
- package/src/lint/post-synth/fixtures/TF002/module-cycle/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF002/module-nested/cdn/edge/main.tf +0 -8
- package/src/lint/post-synth/fixtures/TF002/module-nested/cdn/main.tf +0 -3
- package/src/lint/post-synth/fixtures/TF002/module-nested/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF002/module-other-provider/cdn/main.tf +0 -8
- package/src/lint/post-synth/fixtures/TF002/module-other-provider/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF002/module-pinned/cdn/main.tf +0 -12
- package/src/lint/post-synth/fixtures/TF002/module-pinned/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF002/module-unpinned/cdn/main.tf +0 -7
- package/src/lint/post-synth/fixtures/TF002/module-unpinned/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF002/negative.tf +0 -17
- package/src/lint/post-synth/fixtures/TF002/positive-legacy.tf +0 -10
- package/src/lint/post-synth/fixtures/TF002/positive-no-version.tf +0 -12
- package/src/lint/post-synth/fixtures/TF002/positive.tf +0 -7
- package/src/lint/post-synth/fixtures/TF003/negative.tf +0 -10
- package/src/lint/post-synth/fixtures/TF003/positive.tf +0 -8
- package/src/lint/post-synth/fixtures/TF004/negative-git.tf +0 -3
- package/src/lint/post-synth/fixtures/TF004/negative-local.tf +0 -3
- package/src/lint/post-synth/fixtures/TF004/negative.tf +0 -4
- package/src/lint/post-synth/fixtures/TF004/positive.tf +0 -3
- package/src/lint/post-synth/fixtures/TF005/negative-local.tf +0 -3
- package/src/lint/post-synth/fixtures/TF005/negative-registry.tf +0 -3
- package/src/lint/post-synth/fixtures/TF005/negative-sha.tf +0 -3
- package/src/lint/post-synth/fixtures/TF005/negative.tf +0 -3
- package/src/lint/post-synth/fixtures/TF005/positive-branch.tf +0 -3
- package/src/lint/post-synth/fixtures/TF005/positive-non-semver.tf +0 -3
- package/src/lint/post-synth/fixtures/TF005/positive.tf +0 -3
- package/src/lint/post-synth/fixtures/TF006/negative-null-default.tf +0 -12
- package/src/lint/post-synth/fixtures/TF006/negative.tf +0 -5
- package/src/lint/post-synth/fixtures/TF006/positive-empty-default.tf +0 -5
- package/src/lint/post-synth/fixtures/TF006/positive.tf +0 -6
- package/src/lint/post-synth/fixtures/TF007/negative-names.tf +0 -25
- package/src/lint/post-synth/fixtures/TF007/negative.tf +0 -10
- package/src/lint/post-synth/fixtures/TF007/positive.tf +0 -9
- package/src/lint/post-synth/fixtures/TF008/negative-variable.tf +0 -10
- package/src/lint/post-synth/fixtures/TF008/negative.tf +0 -8
- package/src/lint/post-synth/fixtures/TF008/positive-other-provider.tf +0 -10
- package/src/lint/post-synth/fixtures/TF008/positive.tf +0 -5
- package/src/lint/post-synth/fixtures/TF009/negative.tf +0 -10
- package/src/lint/post-synth/fixtures/TF009/positive.tf +0 -4
- package/src/lint/post-synth/fixtures/TF010/negative.tf +0 -5
- package/src/lint/post-synth/fixtures/TF010/positive.tf +0 -4
- package/src/lint/post-synth/fixtures/TF011/negative.tf +0 -5
- package/src/lint/post-synth/fixtures/TF011/positive-blank.tf +0 -5
- package/src/lint/post-synth/fixtures/TF011/positive.tf +0 -4
- package/src/lint/post-synth/fixtures/TF012/negative.tf +0 -4
- package/src/lint/post-synth/fixtures/TF012/positive.tf +0 -3
- package/src/lint/post-synth/fixtures/TF013/negative.tf +0 -8
- package/src/lint/post-synth/fixtures/TF013/positive-data.tf +0 -8
- package/src/lint/post-synth/fixtures/TF013/positive.tf +0 -8
- package/src/lint/post-synth/fixtures/TF014/negative/main.tf +0 -26
- package/src/lint/post-synth/fixtures/TF014/negative/modules/cdn/main.tf +0 -19
- package/src/lint/post-synth/fixtures/TF014/positive/main.tf +0 -16
- package/src/lint/post-synth/fixtures/TF014/positive/modules/cdn/main.tf +0 -15
- package/src/lint/post-synth/fixtures/TF015/negative/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF015/negative/modules/cdn/main.tf +0 -16
- package/src/lint/post-synth/fixtures/TF015/positive/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF015/positive/modules/cdn/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF016/negative-template.tf +0 -7
- package/src/lint/post-synth/fixtures/TF016/negative.tf +0 -16
- package/src/lint/post-synth/fixtures/TF016/positive-shared-file.tf +0 -12
- package/src/lint/post-synth/fixtures/TF016/positive.tf +0 -13
- package/src/lint/post-synth/fixtures/TF017/negative.tf +0 -4
- package/src/lint/post-synth/fixtures/TF017/positive.tf +0 -5
- package/src/lint/post-synth/fixtures/TF018/negative.tf +0 -9
- package/src/lint/post-synth/fixtures/TF018/positive-data.tf +0 -9
- package/src/lint/post-synth/fixtures/TF018/positive.tf +0 -4
- package/src/lint/post-synth/fixtures/TF019/negative.tf +0 -14
- package/src/lint/post-synth/fixtures/TF019/positive-output.tf +0 -5
- package/src/lint/post-synth/fixtures/TF019/positive.tf +0 -16
- package/src/lint/post-synth/fixtures/TF020/negative.tf +0 -43
- package/src/lint/post-synth/fixtures/TF020/positive.tf +0 -32
- package/src/lint/post-synth/fixtures/TF020/scoped/main.tf +0 -21
- package/src/lint/post-synth/fixtures/TF020/scoped/modules/cdn/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF021/negative.tf +0 -31
- package/src/lint/post-synth/fixtures/TF021/positive-length.tf +0 -8
- package/src/lint/post-synth/fixtures/TF021/positive.tf +0 -8
- package/src/lint/post-synth/fixtures/TF022/negative-locator.tf +0 -7
- package/src/lint/post-synth/fixtures/TF022/negative-secret-reference.tf +0 -32
- package/src/lint/post-synth/fixtures/TF022/negative.tf +0 -10
- package/src/lint/post-synth/fixtures/TF022/positive-nested.tf +0 -10
- package/src/lint/post-synth/fixtures/TF022/positive-secret-data.tf +0 -8
- package/src/lint/post-synth/fixtures/TF022/positive.tf +0 -6
- package/src/lint/post-synth/fixtures/TF023/negative/main.tf +0 -15
- package/src/lint/post-synth/fixtures/TF023/positive/main.tf +0 -9
- package/src/lint/post-synth/fixtures/TF023/positive/state.json +0 -24
- package/src/lint/post-synth/fixtures/TF024/live-backend-second-block/a-versions.tf +0 -3
- package/src/lint/post-synth/fixtures/TF024/live-backend-second-block/b-backend.tf +0 -10
- package/src/lint/post-synth/fixtures/TF024/live-clean/main.tf +0 -9
- package/src/lint/post-synth/fixtures/TF024/live-cloud-second-block/a-versions.tf +0 -3
- package/src/lint/post-synth/fixtures/TF024/live-cloud-second-block/b-cloud.tf +0 -9
- package/src/lint/post-synth/fixtures/TF024/live-with-backend/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF024/live-with-cloud/main.tf +0 -16
- package/src/lint/post-synth/fixtures/TF024/live-with-record-store/main.tf +0 -18
- package/src/lint/post-synth/fixtures/TF024/sidecar-backend-second-block/a-versions.tf +0 -3
- package/src/lint/post-synth/fixtures/TF024/sidecar-backend-second-block/b-backend.tf +0 -6
- package/src/lint/post-synth/fixtures/TF024/sidecar-backend-second-block/estate.chdf.hcl +0 -1
- package/src/lint/post-synth/fixtures/TF024/sidecar-with-backend/estate.chdf.hcl +0 -1
- package/src/lint/post-synth/fixtures/TF024/sidecar-with-backend/main.tf +0 -10
- package/src/lint/post-synth/fixtures/TF025/live-clean/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF025/live-with-workspace-ref/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF026/live-default/main.tf +0 -9
- package/src/lint/post-synth/fixtures/TF026/live-explicit-delete/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF026/live-keep/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF027/live-default/main.tf +0 -9
- package/src/lint/post-synth/fixtures/TF027/live-untagged-delete/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF027/live-untagged-delete-scoped/main.tf +0 -17
- package/src/lint/post-synth/fixtures/TF027/live-untagged-report/main.tf +0 -13
- package/src/lint/post-synth/fixtures/TF028/live/main.tf +0 -9
- package/src/lint/post-synth/fixtures/TF028/stock/main.tf +0 -10
- package/src/lint/post-synth/fixtures/TF029/declared/main.tf +0 -5
- package/src/lint/post-synth/fixtures/TF029/no-declaration/main.tf +0 -5
- package/src/lint/post-synth/fixtures/TF030/negative-rules.tf +0 -45
- package/src/lint/post-synth/fixtures/TF030/negative.tf +0 -55
- package/src/lint/post-synth/fixtures/TF030/not-determined-port.tf +0 -28
- package/src/lint/post-synth/fixtures/TF030/not-determined-standalone.tf +0 -32
- package/src/lint/post-synth/fixtures/TF030/not-determined-vpc-rule.tf +0 -21
- package/src/lint/post-synth/fixtures/TF030/not-determined.tf +0 -39
- package/src/lint/post-synth/fixtures/TF030/positive-ipv6.tf +0 -44
- package/src/lint/post-synth/fixtures/TF030/positive-mixed.tf +0 -36
- package/src/lint/post-synth/fixtures/TF030/positive-standalone.tf +0 -25
- package/src/lint/post-synth/fixtures/TF030/positive.tf +0 -43
- package/src/lint/post-synth/fixtures/TF031/negative.tf +0 -89
- package/src/lint/post-synth/fixtures/TF031/not-determined.tf +0 -139
- package/src/lint/post-synth/fixtures/TF031/positive-data-source.tf +0 -57
- package/src/lint/post-synth/fixtures/TF031/positive-heredoc.tf +0 -149
- package/src/lint/post-synth/fixtures/TF031/positive-jsonencode.tf +0 -115
- package/src/lint/post-synth/fixtures/TF032/negative-heredoc.tf +0 -20
- package/src/lint/post-synth/fixtures/TF032/negative-references.tf +0 -214
- package/src/lint/post-synth/fixtures/TF032/negative.tf +0 -99
- package/src/lint/post-synth/fixtures/TF032/positive-heredoc.tf +0 -22
- package/src/lint/post-synth/fixtures/TF032/positive-sidecar.tf +0 -197
- package/src/lint/post-synth/fixtures/TF032/positive.tf +0 -54
- package/src/lint/post-synth/fixtures/TF033/negative.tf +0 -39
- package/src/lint/post-synth/fixtures/TF033/not-determined-aurora.tf +0 -25
- package/src/lint/post-synth/fixtures/TF033/positive-absent.tf +0 -93
- package/src/lint/post-synth/fixtures/TF033/positive.tf +0 -50
- package/src/lint/post-synth/fixtures/TF034/negative.tf +0 -24
- package/src/lint/post-synth/fixtures/TF034/positive-absent.tf +0 -36
- package/src/lint/post-synth/fixtures/TF034/positive.tf +0 -14
- package/src/lint/post-synth/fixtures/TF035/negative-absent.tf +0 -43
- package/src/lint/post-synth/fixtures/TF035/negative.tf +0 -54
- package/src/lint/post-synth/fixtures/TF035/positive.tf +0 -37
- package/src/lint/post-synth/fixtures/TF036/negative.tf +0 -61
- package/src/lint/post-synth/fixtures/TF036/not-determined.tf +0 -28
- package/src/lint/post-synth/fixtures/TF036/positive.tf +0 -38
- package/src/lint/post-synth/fixtures/TF037/negative-exclusion.tf +0 -63
- package/src/lint/post-synth/fixtures/TF037/negative.tf +0 -27
- package/src/lint/post-synth/fixtures/TF037/not-determined.tf +0 -27
- package/src/lint/post-synth/fixtures/TF037/positive-absent.tf +0 -15
- package/src/lint/post-synth/fixtures/TF037/positive.tf +0 -26
- package/src/lint/post-synth/fixtures/TF038/positive.tf +0 -3
- package/src/lint/post-synth/fixtures/TF039/positive.tf +0 -4
- package/src/lint/post-synth/fixtures/TF041/negative/terragrunt.hcl +0 -12
- package/src/lint/post-synth/fixtures/TF041/positive/terragrunt.hcl +0 -7
- package/src/lint/post-synth/fixtures/TF041/positive-apply/terragrunt.hcl +0 -8
- package/src/lint/post-synth/fixtures/TF042/negative/terragrunt.hcl +0 -13
- package/src/lint/post-synth/fixtures/TF042/positive/terragrunt.hcl +0 -9
- package/src/lint/post-synth/fixtures/TF043/negative/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF043/negative-other/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF043/positive-git/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF043/positive-oci/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF043/positive-tfr/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF044/negative/terragrunt.hcl +0 -9
- package/src/lint/post-synth/fixtures/TF044/positive/terragrunt.hcl +0 -7
- package/src/lint/post-synth/fixtures/TF044/positive-generate/terragrunt.hcl +0 -9
- package/src/lint/post-synth/fixtures/TF045/negative/root.hcl +0 -1
- package/src/lint/post-synth/fixtures/TF045/negative/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF045/positive/root.hcl +0 -9
- package/src/lint/post-synth/fixtures/TF045/positive/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF045/unit-only/terragrunt.hcl +0 -3
- package/src/lint/post-synth/fixtures/TF046/azurerm-no-resource-group/main.tf +0 -15
- package/src/lint/post-synth/fixtures/TF046/backend-config-only/main.tf +0 -14
- package/src/lint/post-synth/fixtures/TF046/derived-s3/backend.tf +0 -7
- package/src/lint/post-synth/fixtures/TF046/derived-s3/main.tf +0 -9
- package/src/lint/post-synth/fixtures/TF046/explicit-local/main.tf +0 -16
- package/src/lint/post-synth/fixtures/TF046/explicit-s3-beside-local-backend/main.tf +0 -15
- package/src/lint/post-synth/fixtures/TF046/implied-local/main.tf +0 -9
- package/src/lint/post-synth/fixtures/TF046/sidecar-implied/estate.chdf.hcl +0 -1
- package/src/lint/post-synth/fixtures/TF046/sidecar-implied/main.tf +0 -5
- package/src/lint/post-synth/fixtures/TF047/clear/main.tf +0 -12
- package/src/lint/post-synth/fixtures/TF047/refused/main.tf +0 -12
- package/src/lint/post-synth/fixtures/TF047/unknown-module/main.tf +0 -12
- package/src/lint/post-synth/fixtures/TF047/unknown-version/main.tf +0 -12
- package/src/lint/post-synth/fixtures/estate-2284/clean/main.tf +0 -132
- package/src/lint/post-synth/fixtures/estate-2284/violating/main.tf +0 -112
- package/src/lint/post-synth/fixtures/load.ts +0 -108
- package/src/lint/post-synth/flat-attributes.ts +0 -146
- package/src/lint/post-synth/index.ts +0 -97
- package/src/lint/post-synth/live-refusals-config-format.test.ts +0 -143
- package/src/lint/post-synth/module-rules.test.ts +0 -153
- package/src/lint/post-synth/module-source.test.ts +0 -116
- package/src/lint/post-synth/module-source.ts +0 -176
- package/src/lint/post-synth/post-synth.test.ts +0 -191
- package/src/lint/post-synth/record-store.ts +0 -122
- package/src/lint/post-synth/scope.ts +0 -107
- package/src/lint/post-synth/single-block.test.ts +0 -286
- package/src/lint/post-synth/suppression.test.ts +0 -110
- package/src/lint/post-synth/terragrunt.ts +0 -76
- package/src/lint/post-synth/tf001.ts +0 -160
- package/src/lint/post-synth/tf002.test.ts +0 -137
- package/src/lint/post-synth/tf002.ts +0 -188
- package/src/lint/post-synth/tf003.test.ts +0 -75
- package/src/lint/post-synth/tf003.ts +0 -71
- package/src/lint/post-synth/tf004.test.ts +0 -47
- package/src/lint/post-synth/tf004.ts +0 -63
- package/src/lint/post-synth/tf005.test.ts +0 -57
- package/src/lint/post-synth/tf005.ts +0 -76
- package/src/lint/post-synth/tf006.ts +0 -58
- package/src/lint/post-synth/tf007.ts +0 -78
- package/src/lint/post-synth/tf008.ts +0 -75
- package/src/lint/post-synth/tf009.ts +0 -59
- package/src/lint/post-synth/tf010.ts +0 -51
- package/src/lint/post-synth/tf011.ts +0 -49
- package/src/lint/post-synth/tf012.ts +0 -47
- package/src/lint/post-synth/tf013.ts +0 -63
- package/src/lint/post-synth/tf014.ts +0 -72
- package/src/lint/post-synth/tf015.ts +0 -72
- package/src/lint/post-synth/tf016.ts +0 -75
- package/src/lint/post-synth/tf017.ts +0 -50
- package/src/lint/post-synth/tf018.ts +0 -72
- package/src/lint/post-synth/tf019.ts +0 -72
- package/src/lint/post-synth/tf020.ts +0 -123
- package/src/lint/post-synth/tf021.ts +0 -126
- package/src/lint/post-synth/tf022.ts +0 -78
- package/src/lint/post-synth/tf024.test.ts +0 -84
- package/src/lint/post-synth/tf024.ts +0 -153
- package/src/lint/post-synth/tf025.test.ts +0 -46
- package/src/lint/post-synth/tf025.ts +0 -101
- package/src/lint/post-synth/tf026.test.ts +0 -56
- package/src/lint/post-synth/tf026.ts +0 -84
- package/src/lint/post-synth/tf027.test.ts +0 -62
- package/src/lint/post-synth/tf027.ts +0 -74
- package/src/lint/post-synth/tf028.test.ts +0 -92
- package/src/lint/post-synth/tf028.ts +0 -96
- package/src/lint/post-synth/tf029.test.ts +0 -72
- package/src/lint/post-synth/tf029.ts +0 -85
- package/src/lint/post-synth/tf030.test.ts +0 -219
- package/src/lint/post-synth/tf030.ts +0 -290
- package/src/lint/post-synth/tf031.test.ts +0 -229
- package/src/lint/post-synth/tf031.ts +0 -370
- package/src/lint/post-synth/tf032.test.ts +0 -127
- package/src/lint/post-synth/tf032.ts +0 -226
- package/src/lint/post-synth/tf033.test.ts +0 -126
- package/src/lint/post-synth/tf033.ts +0 -160
- package/src/lint/post-synth/tf034.test.ts +0 -71
- package/src/lint/post-synth/tf034.ts +0 -63
- package/src/lint/post-synth/tf035.test.ts +0 -68
- package/src/lint/post-synth/tf035.ts +0 -74
- package/src/lint/post-synth/tf036.test.ts +0 -87
- package/src/lint/post-synth/tf036.ts +0 -119
- package/src/lint/post-synth/tf037.test.ts +0 -88
- package/src/lint/post-synth/tf037.ts +0 -101
- package/src/lint/post-synth/tf038.test.ts +0 -51
- package/src/lint/post-synth/tf038.ts +0 -71
- package/src/lint/post-synth/tf039.test.ts +0 -40
- package/src/lint/post-synth/tf039.ts +0 -64
- package/src/lint/post-synth/tf040.test.ts +0 -55
- package/src/lint/post-synth/tf040.ts +0 -76
- package/src/lint/post-synth/tf041.test.ts +0 -50
- package/src/lint/post-synth/tf041.ts +0 -56
- package/src/lint/post-synth/tf042.test.ts +0 -19
- package/src/lint/post-synth/tf042.ts +0 -42
- package/src/lint/post-synth/tf043.test.ts +0 -65
- package/src/lint/post-synth/tf043.ts +0 -49
- package/src/lint/post-synth/tf044.test.ts +0 -27
- package/src/lint/post-synth/tf044.ts +0 -51
- package/src/lint/post-synth/tf045.test.ts +0 -30
- package/src/lint/post-synth/tf045.ts +0 -47
- package/src/lint/post-synth/tf046.test.ts +0 -137
- package/src/lint/post-synth/tf046.ts +0 -204
- package/src/lint/post-synth/tf047.test.ts +0 -56
- package/src/lint/post-synth/tf047.ts +0 -114
- package/src/lint/presets.test.ts +0 -72
- package/src/lint/rules/fixtures/TF101/negative-op.ts +0 -2
- package/src/lint/rules/fixtures/TF101/positive-op.ts +0 -2
- package/src/lint/rules/fixtures/load.ts +0 -53
- package/src/lint/rules/index.ts +0 -7
- package/src/lint/rules/plan-before-apply.test.ts +0 -216
- package/src/lint/rules/plan-before-apply.ts +0 -154
- package/src/lint/secret-shape.test.ts +0 -180
- package/src/lint/secret-shape.ts +0 -234
- package/src/live-ownership.ts +0 -60
- package/src/live-plan-depth.acceptance.e2e.test.ts +0 -193
- package/src/live-plan-reasons.ts +0 -54
- package/src/live-record-store.test.ts +0 -76
- package/src/live-roots.test.ts +0 -80
- package/src/live-roots.ts +0 -347
- package/src/lock-rows.test.ts +0 -78
- package/src/lock-rows.ts +0 -82
- package/src/lock-timeout.ts +0 -34
- package/src/lsp/completions.test.ts +0 -121
- package/src/lsp/completions.ts +0 -101
- package/src/lsp/context.test.ts +0 -152
- package/src/lsp/context.ts +0 -349
- package/src/lsp/hover.test.ts +0 -82
- package/src/lsp/hover.ts +0 -44
- package/src/lsp/option-keys.ts +0 -114
- package/src/migration-history.test.ts +0 -83
- package/src/migration-history.ts +0 -199
- package/src/module-catalog/index.test.ts +0 -93
- package/src/module-catalog/index.ts +0 -162
- package/src/module-catalog/refresh-cli.ts +0 -68
- package/src/module-catalog/static-tier.ts +0 -1659
- package/src/module-catalog/types.ts +0 -88
- package/src/op/activities/choudoufu-plan-set-op.test.ts +0 -111
- package/src/op/activities/choudoufu-waves.test.ts +0 -176
- package/src/op/activities/choudoufu.acceptance.test.ts +0 -127
- package/src/op/activities/choudoufu.test.ts +0 -725
- package/src/op/activities/index.ts +0 -97
- package/src/op/activities/live-detect.test.ts +0 -143
- package/src/op/activities/live-detect.ts +0 -278
- package/src/op/activities/pin-rollout.ts +0 -80
- package/src/op/activities/registry.test.ts +0 -38
- package/src/op/activities/terraform.test.ts +0 -932
- package/src/op/activities/terraform.ts +0 -2484
- package/src/op/activity-contracts.test.ts +0 -151
- package/src/op/activity-contracts.ts +0 -244
- package/src/op/adoption.test.ts +0 -288
- package/src/op/adoption.ts +0 -373
- package/src/op/builders.test.ts +0 -145
- package/src/op/builders.ts +0 -213
- package/src/op/command-hook.ts +0 -237
- package/src/op/resolve-root-mode.test.ts +0 -85
- package/src/op/resolve-root-mode.ts +0 -86
- package/src/op-wave-step.test.ts +0 -109
- package/src/ops-doc-parity.test.ts +0 -147
- package/src/package-cli.ts +0 -21
- package/src/pin/__fixtures__/consumers/live/dev/main.tf +0 -4
- package/src/pin/__fixtures__/consumers/live/prod/main.tf +0 -21
- package/src/pin/__fixtures__/consumers/units/vpc/terragrunt.hcl +0 -7
- package/src/pin/bundle.test.ts +0 -57
- package/src/pin/consumers.test.ts +0 -57
- package/src/pin/consumers.ts +0 -95
- package/src/pin/edit-ts.test.ts +0 -39
- package/src/pin/edit-ts.ts +0 -77
- package/src/pin/edit.test.ts +0 -199
- package/src/pin/edit.ts +0 -187
- package/src/pin/forge.ts +0 -91
- package/src/pin/index.ts +0 -22
- package/src/pin/rollout.test.ts +0 -232
- package/src/pin/rollout.ts +0 -462
- package/src/pin/scan.ts +0 -320
- package/src/pin/source.ts +0 -206
- package/src/pin/waves.test.ts +0 -101
- package/src/pin/waves.ts +0 -125
- package/src/plan-digest.test.ts +0 -89
- package/src/plan-digest.ts +0 -140
- package/src/plan-observation.ts +0 -428
- package/src/plan-read.acceptance.test.ts +0 -184
- package/src/plan-shape.test.ts +0 -148
- package/src/plan-shape.ts +0 -128
- package/src/plan-summary.test.ts +0 -172
- package/src/plugin.test.ts +0 -412
- package/src/plugin.ts +0 -392
- package/src/pr-env.test.ts +0 -132
- package/src/pr-env.ts +0 -312
- package/src/reach.test.ts +0 -72
- package/src/reach.ts +0 -196
- package/src/redact-ir.e2e.test.ts +0 -79
- package/src/redact.test.ts +0 -119
- package/src/registry/__fixtures__/docs/documented/.terraform-docs.yml +0 -3
- package/src/registry/__fixtures__/docs/documented/README.md +0 -1
- package/src/registry/__fixtures__/docs/documented/main.tf +0 -8
- package/src/registry/__fixtures__/docs/json/main.tf.json +0 -14
- package/src/registry/__fixtures__/docs/vpc/README.md +0 -3
- package/src/registry/__fixtures__/docs/vpc/examples/complete/main.tf +0 -5
- package/src/registry/__fixtures__/docs/vpc/examples/simple/README.md +0 -1
- package/src/registry/__fixtures__/docs/vpc/examples/simple/main.tf +0 -4
- package/src/registry/__fixtures__/docs/vpc/main.tf +0 -14
- package/src/registry/__fixtures__/docs/vpc/outputs.tf +0 -9
- package/src/registry/__fixtures__/docs/vpc/variables.tf +0 -16
- package/src/registry/__fixtures__/proxied-root/main.tf +0 -12
- package/src/registry/address.ts +0 -100
- package/src/registry/catalog-read.ts +0 -56
- package/src/registry/deprecated.test.ts +0 -139
- package/src/registry/deprecated.ts +0 -76
- package/src/registry/docs.test.ts +0 -140
- package/src/registry/docs.ts +0 -299
- package/src/registry/edge/bundle.test.ts +0 -50
- package/src/registry/edge/edge.test.ts +0 -176
- package/src/registry/edge/edge.ts +0 -211
- package/src/registry/edge/index.ts +0 -10
- package/src/registry/edge/lambda-edge.ts +0 -127
- package/src/registry/edge/sigv4-web.ts +0 -79
- package/src/registry/edge/token-source.test.ts +0 -258
- package/src/registry/edge/token-source.ts +0 -169
- package/src/registry/edge/worker.ts +0 -61
- package/src/registry/handler.ts +0 -89
- package/src/registry/headers-file.ts +0 -61
- package/src/registry/index.ts +0 -32
- package/src/registry/mirror-paths.ts +0 -10
- package/src/registry/mirror.test.ts +0 -198
- package/src/registry/mirror.ts +0 -395
- package/src/registry/proxies.test.ts +0 -153
- package/src/registry/proxies.ts +0 -132
- package/src/registry/reader.ts +0 -225
- package/src/registry/registry.test.ts +0 -262
- package/src/registry/semver.ts +0 -34
- package/src/registry/serve.ts +0 -82
- package/src/registry/source-forms.test.ts +0 -87
- package/src/registry/source-forms.ts +0 -216
- package/src/registry/targets/artifactory.test.ts +0 -248
- package/src/registry/targets/artifactory.ts +0 -257
- package/src/registry/targets/fake-artifactory.ts +0 -158
- package/src/registry/targets/fake-gitlab.ts +0 -161
- package/src/registry/targets/fake-hcp.ts +0 -233
- package/src/registry/targets/fake-http.ts +0 -97
- package/src/registry/targets/fake-nexus.ts +0 -152
- package/src/registry/targets/gitlab.test.ts +0 -208
- package/src/registry/targets/gitlab.ts +0 -223
- package/src/registry/targets/hcp.test.ts +0 -230
- package/src/registry/targets/hcp.ts +0 -360
- package/src/registry/targets/hosted.ts +0 -117
- package/src/registry/targets/index.ts +0 -17
- package/src/registry/targets/module-target.ts +0 -131
- package/src/registry/targets/nexus.test.ts +0 -220
- package/src/registry/targets/nexus.ts +0 -314
- package/src/registry/targets/zip.test.ts +0 -65
- package/src/registry/targets/zip.ts +0 -287
- package/src/registry/writer.ts +0 -155
- package/src/report.test.ts +0 -423
- package/src/report.ts +0 -752
- package/src/search-build-roots.test.ts +0 -125
- package/src/search-count.test.ts +0 -144
- package/src/search-kind-type.test.ts +0 -136
- package/src/serializer.test.ts +0 -26
- package/src/serializer.ts +0 -26
- package/src/signal-only-root.test.ts +0 -72
- package/src/skills/chant-terraform.md +0 -92
- package/src/state/azure-blob.ts +0 -8
- package/src/state/backend-verdict.test.ts +0 -188
- package/src/state/backend.test.ts +0 -129
- package/src/state/backend.ts +0 -563
- package/src/state/engine-env.test.ts +0 -18
- package/src/state/exec.ts +0 -158
- package/src/state/gcs.ts +0 -7
- package/src/state/gitlab.test.ts +0 -226
- package/src/state/gitlab.ts +0 -331
- package/src/state/index.ts +0 -18
- package/src/state/locks.test.ts +0 -84
- package/src/state/locks.ts +0 -201
- package/src/state/object-store.ts +0 -7
- package/src/state/root-states-floci.e2e.test.ts +0 -66
- package/src/state/root-states.test.ts +0 -462
- package/src/state/root-states.ts +0 -309
- package/src/state/s3.ts +0 -22
- package/src/state/source.ts +0 -289
- package/src/state/store.ts +0 -360
- package/src/state/versions.test.ts +0 -365
- package/src/state/versions.ts +0 -183
- package/src/state-export-unlock.test.ts +0 -230
- package/src/state-migration-backends.test.ts +0 -277
- package/src/state-migration.test.ts +0 -236
- package/src/state-migration.ts +0 -595
- package/src/state-ops.test.ts +0 -182
- package/src/state-ops.ts +0 -469
- package/src/state-ownership.ts +0 -32
- package/src/state-reads.ts +0 -134
- package/src/template/__fixtures__/app-root.golden.tf +0 -25
- package/src/template/index.ts +0 -17
- package/src/template/render.test.ts +0 -230
- package/src/template/render.ts +0 -352
- package/src/terragrunt/affected.acceptance.test.ts +0 -83
- package/src/terragrunt/affected.test.ts +0 -188
- package/src/terragrunt/affected.ts +0 -350
- package/src/terragrunt/capability.test.ts +0 -421
- package/src/terragrunt/capability.ts +0 -446
- package/src/terragrunt/index.ts +0 -15
- package/src/terragrunt/mocks.acceptance.test.ts +0 -105
- package/src/terragrunt/mocks.test.ts +0 -422
- package/src/terragrunt/mocks.ts +0 -399
- package/src/terragrunt/place.test.ts +0 -42
- package/src/terragrunt/place.ts +0 -75
- package/src/terragrunt/run.ts +0 -532
- package/src/terragrunt/terragrunt.acceptance.test.ts +0 -122
- package/src/terragrunt/terragrunt.test.ts +0 -332
- package/src/terragrunt/units.ts +0 -260
- package/src/terragrunt/wave.ts +0 -203
- package/src/used-sources.test.ts +0 -75
- package/src/used-sources.ts +0 -204
- package/src/validate-cli.ts +0 -5
- package/src/validate.ts +0 -37
- package/src/workspace-kinds.test.ts +0 -36
- /package/{src → dist}/generated/lexicon-terraform.json +0 -0
package/src/report.ts
DELETED
|
@@ -1,752 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `chant terraform report`: a run report from `show -json` of a saved plan, in
|
|
3
|
-
* the `terragucci.report/v1` shape that behold's kiosk reads, for pipelines
|
|
4
|
-
* that run plain `terraform`, `terragrunt`, `atmos` or `choudoufu` and have no
|
|
5
|
-
* terragucci in them.
|
|
6
|
-
*
|
|
7
|
-
* It covers one composed run: a root whose only content is `module` calls
|
|
8
|
-
* (choudoufu's composed root, chant#4419), planned and applied as one. Each
|
|
9
|
-
* top-level module becomes one root of the report, with its part of the plan
|
|
10
|
-
* taken as if it had planned alone (`module.<m>.` off every address), the way
|
|
11
|
-
* terragucci's own composed run reports it.
|
|
12
|
-
*
|
|
13
|
-
* What it writes is the part of the v1 contract a reader needs to draw the
|
|
14
|
-
* run: roots, their changes with before and after values, "known after
|
|
15
|
-
* apply" for values the plan cannot know, one composed wave, the totals,
|
|
16
|
-
* groups and named destroys, the index row, and each root's `reads`: the
|
|
17
|
-
* `data "terraform_estate_outputs"` blocks that read another module's estate,
|
|
18
|
-
* and, in an Atmos repo, the `!terraform.output` calls in its stack manifests,
|
|
19
|
-
* which behold draws as the lines between roots. The estate of each module
|
|
20
|
-
* comes from the `live` block in its directory (`<repo>/<root-dir>/<module>`),
|
|
21
|
-
* since the plan holds none. After an apply, a second
|
|
22
|
-
* `show -json` (of a plan made once the apply finished, whose `prior_state`
|
|
23
|
-
* holds the state) fills in the values the plan left unknown. It writes no
|
|
24
|
-
* report.html, no plan files, no policy, cost or approval fields.
|
|
25
|
-
*
|
|
26
|
-
* The change set is {@link terraformChangeSetPart}'s, and the grouping is
|
|
27
|
-
* chant's `groupChangeSet`, so a report here and one from terragucci agree on
|
|
28
|
-
* what changed.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
32
|
-
import { dirname, join } from "node:path";
|
|
33
|
-
import { changeSetDigest, composeChangeSet, type ChangeSetAction, type ChangeSetDocument, type ChangeSetAttribute, type ChangeSetEntry, type ChangeSetPlanner } from "@intentius/chant/change-set";
|
|
34
|
-
import { groupChangeSet } from "@intentius/chant/plan-summary";
|
|
35
|
-
import { plannerForBinary, terraformChangeSetPart } from "./change-set";
|
|
36
|
-
import { moduleChanges, stripModule, topModule } from "./compose/module-address";
|
|
37
|
-
import { stateResources } from "./applied-state";
|
|
38
|
-
import { isJsonConfigFile, jsonLiveBlocks, listConfigFiles } from "./hcl/files";
|
|
39
|
-
|
|
40
|
-
export { topModule } from "./compose/module-address";
|
|
41
|
-
|
|
42
|
-
type Json = Record<string, unknown>;
|
|
43
|
-
const isObject = (v: unknown): v is Json => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
44
|
-
|
|
45
|
-
export const REPORT_SCHEMA = "terragucci.report/v1";
|
|
46
|
-
export const INDEX_SCHEMA = "terragucci.report-index/v1";
|
|
47
|
-
/** The minor of the v1 contract the report is written to: `compose.estate` is minor 48. */
|
|
48
|
-
export const REPORT_MINOR = 48;
|
|
49
|
-
/** What terragucci puts in place of a redacted value; the report carries no values it would need to redact. */
|
|
50
|
-
export const REDACTED = "(sensitive, redacted by terragucci)";
|
|
51
|
-
|
|
52
|
-
export type ReportStage = "tf-plan" | "tf-apply";
|
|
53
|
-
|
|
54
|
-
export interface RunFacts {
|
|
55
|
-
/** `<host>/<path>` of the repo, as terragucci names a project. */
|
|
56
|
-
project: string;
|
|
57
|
-
commit: string;
|
|
58
|
-
job_url?: string;
|
|
59
|
-
commit_url?: string;
|
|
60
|
-
pull_request?: string;
|
|
61
|
-
pull_request_url?: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* The run's facts from a Forgejo, Gitea or GitHub Actions environment
|
|
66
|
-
* (`GITHUB_REPOSITORY`, `GITHUB_SERVER_URL`, `GITHUB_SHA`, `GITHUB_RUN_ID`,
|
|
67
|
-
* which Forgejo sets too). `project` and `commit` override it; `pullRequest`
|
|
68
|
-
* is the number, when the run has one.
|
|
69
|
-
*/
|
|
70
|
-
export function runFactsFromEnv(env: NodeJS.ProcessEnv, over: { pullRequest?: string; project?: string; commit?: string } = {}): RunFacts {
|
|
71
|
-
const repo = env.GITHUB_REPOSITORY;
|
|
72
|
-
const server = (env.GITHUB_SERVER_URL ?? "https://github.com").replace(/\/+$/, "");
|
|
73
|
-
const commit = over.commit ?? env.GITHUB_SHA;
|
|
74
|
-
const project = over.project ?? (repo ? `${new URL(server).host}/${repo}` : undefined);
|
|
75
|
-
if (!project || !commit) throw new Error("GITHUB_REPOSITORY and GITHUB_SHA are not set; pass --project and --commit");
|
|
76
|
-
const web = repo ? `${server}/${repo}` : undefined;
|
|
77
|
-
const forgejo = env.FORGEJO_ACTIONS === "true" || env.GITEA_ACTIONS === "true";
|
|
78
|
-
const number = over.pullRequest && /^\d+$/.test(over.pullRequest.trim()) ? over.pullRequest.trim() : undefined;
|
|
79
|
-
return {
|
|
80
|
-
project,
|
|
81
|
-
commit,
|
|
82
|
-
...(web && env.GITHUB_RUN_ID ? { job_url: `${web}/actions/runs/${env.GITHUB_RUN_ID}` } : {}),
|
|
83
|
-
...(web ? { commit_url: `${web}/commit/${commit}` } : {}),
|
|
84
|
-
...(web && number ? { pull_request: number, pull_request_url: `${web}/${forgejo ? "pulls" : "pull"}/${number}` } : number ? { pull_request: number } : {}),
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface TerraformReportInput {
|
|
89
|
-
stage: ReportStage;
|
|
90
|
-
/** `show -json` of the saved plan. */
|
|
91
|
-
plan: unknown;
|
|
92
|
-
/** tf-apply: `show -json` of a plan made after the apply. Its `prior_state` holds the applied values. */
|
|
93
|
-
applied?: unknown;
|
|
94
|
-
run: RunFacts;
|
|
95
|
-
/** The binary that planned, by name or path. Default `terraform`. */
|
|
96
|
-
binary?: string;
|
|
97
|
-
/** The binary's version, when known. */
|
|
98
|
-
binaryVersion?: string;
|
|
99
|
-
/** Where each root lives in the repo: the root of module `network` is `<rootDir>/network`. Default: the module's name. */
|
|
100
|
-
rootDir?: string;
|
|
101
|
-
/** The path of the composed root itself, which holds any resource declared outside a module. Default: `rootDir`, else `.`. */
|
|
102
|
-
selfRoot?: string;
|
|
103
|
-
/**
|
|
104
|
-
* The estate each module's directory names in its `live` block, by module:
|
|
105
|
-
* what ties a `terraform_estate_outputs` read to the module that owns the
|
|
106
|
-
* estate. The plan carries no `live` block, so {@link moduleEstates} reads it
|
|
107
|
-
* from the directories. A read of an estate none of these names has no edge.
|
|
108
|
-
*/
|
|
109
|
-
estates?: Record<string, string>;
|
|
110
|
-
/**
|
|
111
|
-
* What each module reads off the others' outputs through the stack that
|
|
112
|
-
* wires them, by module: Atmos's `!terraform.output` ({@link atmosStackReads}).
|
|
113
|
-
* Atmos resolves those into plain variables before the plan, so the plan
|
|
114
|
-
* holds no trace of them. A module already read through an estate data
|
|
115
|
-
* block is not read twice.
|
|
116
|
-
*/
|
|
117
|
-
componentReads?: ComponentReads;
|
|
118
|
-
started?: string;
|
|
119
|
-
finished: string;
|
|
120
|
-
runtime?: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export interface IndexRow {
|
|
124
|
-
project: string;
|
|
125
|
-
commit: string;
|
|
126
|
-
stage: ReportStage;
|
|
127
|
-
finished: string;
|
|
128
|
-
path: string;
|
|
129
|
-
roots: number;
|
|
130
|
-
groups: number;
|
|
131
|
-
totals: { create: number; update: number; replace: number; delete: number };
|
|
132
|
-
refused: number;
|
|
133
|
-
failed: number;
|
|
134
|
-
changed: number;
|
|
135
|
-
destroys: string[];
|
|
136
|
-
applied?: string;
|
|
137
|
-
commit_url?: string;
|
|
138
|
-
pull_request?: string;
|
|
139
|
-
pull_request_url?: string;
|
|
140
|
-
job_url?: string;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// ---------------------------------------------------------------------------
|
|
144
|
-
// Slicing the composed plan into one plan per module.
|
|
145
|
-
// ---------------------------------------------------------------------------
|
|
146
|
-
|
|
147
|
-
/** The plan's `resource_changes` that belong to module `m` (undefined: the root's own), each with the module taken off its address. */
|
|
148
|
-
export function slicePlan(plan: unknown, m: string | undefined): Json {
|
|
149
|
-
const p = isObject(plan) ? plan : {};
|
|
150
|
-
return { ...(p.errored === true ? { errored: true } : {}), resource_changes: moduleChanges(p.resource_changes, m) };
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// ---------------------------------------------------------------------------
|
|
154
|
-
// Applied values: the state after the apply gives the values the plan left unknown,
|
|
155
|
-
// read through `./applied-state`, as the composed estate run reads them.
|
|
156
|
-
// ---------------------------------------------------------------------------
|
|
157
|
-
|
|
158
|
-
/** Whether a sensitivity map marks anything under it `true`. */
|
|
159
|
-
function marks(v: unknown): boolean {
|
|
160
|
-
if (v === true) return true;
|
|
161
|
-
if (Array.isArray(v)) return v.some(marks);
|
|
162
|
-
if (isObject(v)) return Object.values(v).some(marks);
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/** Each unknown attribute given the value the state holds. One the state lacks stays unknown; a sensitive one stays `sensitive`. */
|
|
167
|
-
function resolveUnknowns(attributes: ChangeSetAttribute[], res: { values: Json; sensitive: Json } | undefined): ChangeSetAttribute[] {
|
|
168
|
-
if (!res || !attributes.some((a) => a.unknown)) return attributes;
|
|
169
|
-
return attributes.map((a) => {
|
|
170
|
-
if (!a.unknown) return a;
|
|
171
|
-
const { unknown: _u, before: _b, after: _a, ...rest } = a;
|
|
172
|
-
if (a.sensitive || marks(res.sensitive[a.path])) return { ...rest, sensitive: true as const };
|
|
173
|
-
const value = res.values[a.path];
|
|
174
|
-
if (value === undefined) return a;
|
|
175
|
-
return { ...rest, ...(a.before !== undefined ? { before: a.before } : {}), after: value };
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// ---------------------------------------------------------------------------
|
|
180
|
-
// Reads: `data "terraform_estate_outputs"` blocks between the composed modules.
|
|
181
|
-
// ---------------------------------------------------------------------------
|
|
182
|
-
|
|
183
|
-
/** One `read` of the report schema's `reads`, as a composed run writes it. */
|
|
184
|
-
export interface ReportRead {
|
|
185
|
-
upstream: string;
|
|
186
|
-
data: string;
|
|
187
|
-
outputs: "planned";
|
|
188
|
-
unknown?: string[];
|
|
189
|
-
/** Why the read is there, when no data block names it: Atmos's `!terraform.output` and the outputs it reads. */
|
|
190
|
-
why?: string;
|
|
191
|
-
composed: true;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* The estate named by the first `live { estate = "..." }` block in a
|
|
196
|
-
* directory's configuration files, in filename order, or undefined. A `live`
|
|
197
|
-
* block takes effect only under choudoufu, so the files are the ones
|
|
198
|
-
* choudoufu reads (`.tf`, `.tf.json`, `.tofu` and `.tofu.json`, chant#4457)
|
|
199
|
-
* unless `binary` names another. A JSON-syntax file's `live` block is the one
|
|
200
|
-
* nested in its `terraform` block (chant#4504).
|
|
201
|
-
*/
|
|
202
|
-
export function estateOfDir(dir: string, binary = "choudoufu"): string | undefined {
|
|
203
|
-
let files: string[];
|
|
204
|
-
try {
|
|
205
|
-
files = listConfigFiles(dir, binary);
|
|
206
|
-
} catch {
|
|
207
|
-
return undefined;
|
|
208
|
-
}
|
|
209
|
-
for (const f of files) {
|
|
210
|
-
if (isJsonConfigFile(f)) {
|
|
211
|
-
const estate = jsonLiveBlocks(readFileSync(join(dir, f), "utf8")).map((b) => b.estate).find((e): e is string => typeof e === "string" && e !== "");
|
|
212
|
-
if (estate) return estate;
|
|
213
|
-
continue;
|
|
214
|
-
}
|
|
215
|
-
const text = readFileSync(join(dir, f), "utf8").replace(/^\s*(#|\/\/).*$/gm, "");
|
|
216
|
-
const live = /\blive\s*\{/.exec(text);
|
|
217
|
-
if (!live) continue;
|
|
218
|
-
const m = /\bestate\s*=\s*"([^"]+)"/.exec(text.slice(live.index + live[0].length));
|
|
219
|
-
if (m) return m[1];
|
|
220
|
-
}
|
|
221
|
-
return undefined;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/** Each module's estate, read from `<repo>/<rootDir>/<module>`. A module whose directory has no `live` block is left out. */
|
|
225
|
-
export function moduleEstates(repo: string, rootDir: string, modules: readonly string[]): Record<string, string> {
|
|
226
|
-
const out: Record<string, string> = {};
|
|
227
|
-
for (const m of modules) {
|
|
228
|
-
const dir = join(repo, rootDir, m);
|
|
229
|
-
const estate = existsSync(dir) ? estateOfDir(dir) : undefined;
|
|
230
|
-
if (estate) out[m] = estate;
|
|
231
|
-
}
|
|
232
|
-
return out;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function anyUnknown(v: unknown): boolean {
|
|
236
|
-
if (v === true) return true;
|
|
237
|
-
if (Array.isArray(v)) return v.some(anyUnknown);
|
|
238
|
-
if (isObject(v)) return Object.values(v).some(anyUnknown);
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/** The module's own configuration (`configuration.root_module.module_calls.<m>.module`), or undefined. */
|
|
243
|
-
function moduleConfig(plan: Json, m: string): Json | undefined {
|
|
244
|
-
const root = isObject(plan.configuration) && isObject(plan.configuration.root_module) ? plan.configuration.root_module : {};
|
|
245
|
-
const call = isObject(root.module_calls) ? root.module_calls[m] : undefined;
|
|
246
|
-
return isObject(call) && isObject(call.module) ? call.module : undefined;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/** Every `references` string under an expression or a configuration. */
|
|
250
|
-
function references(v: unknown, out: string[] = []): string[] {
|
|
251
|
-
if (Array.isArray(v)) for (const x of v) references(x, out);
|
|
252
|
-
else if (isObject(v)) {
|
|
253
|
-
for (const [k, x] of Object.entries(v)) {
|
|
254
|
-
if (k === "references" && Array.isArray(x)) {
|
|
255
|
-
for (const r of x) if (typeof r === "string") out.push(r);
|
|
256
|
-
} else references(x, out);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
return out;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* The outputs of module `u` that the plan cannot know. Two sources, joined:
|
|
264
|
-
* the composed root's own planned outputs (`<u>__<name>`, as terragucci's
|
|
265
|
-
* composed root writes them), and each output of `u`'s configuration whose
|
|
266
|
-
* expression refers to an attribute of a resource the plan leaves unknown.
|
|
267
|
-
*/
|
|
268
|
-
function unknownOutputsOf(plan: Json, u: string): Set<string> {
|
|
269
|
-
const out = new Set<string>();
|
|
270
|
-
const prefix = `${u}__`;
|
|
271
|
-
if (isObject(plan.output_changes)) {
|
|
272
|
-
for (const [k, c] of Object.entries(plan.output_changes)) if (k.startsWith(prefix) && isObject(c) && anyUnknown(c.after_unknown)) out.add(k.slice(prefix.length));
|
|
273
|
-
} else if (isObject(plan.planned_values) && isObject(plan.planned_values.outputs)) {
|
|
274
|
-
for (const [k, o] of Object.entries(plan.planned_values.outputs)) if (k.startsWith(prefix) && isObject(o) && !("value" in o)) out.add(k.slice(prefix.length));
|
|
275
|
-
}
|
|
276
|
-
const cfg = moduleConfig(plan, u);
|
|
277
|
-
const outputs = cfg && isObject(cfg.outputs) ? cfg.outputs : {};
|
|
278
|
-
const changes = (Array.isArray(plan.resource_changes) ? plan.resource_changes : []).filter((r): r is Json => isObject(r) && topModule(String(r.module_address ?? r.address ?? "")) === u);
|
|
279
|
-
for (const [name, o] of Object.entries(outputs)) {
|
|
280
|
-
for (const ref of references(o)) {
|
|
281
|
-
const parts = ref.split(".");
|
|
282
|
-
const data = parts[0] === "data";
|
|
283
|
-
const [type, rname, attr] = data ? [parts[1], parts[2], parts[3]] : [parts[0], parts[1], parts[2]];
|
|
284
|
-
if (!type || !rname) continue;
|
|
285
|
-
const unprefixed = (c: Json): string => stripModule(String(c.address)).replace(/\[[^\]]*\]$/, "");
|
|
286
|
-
for (const c of changes) {
|
|
287
|
-
if (unprefixed(c) !== `${data ? "data." : ""}${type}.${rname}`) continue;
|
|
288
|
-
const after = isObject(c.change) ? c.change.after_unknown : undefined;
|
|
289
|
-
if (attr === undefined ? anyUnknown(after) : isObject(after) && anyUnknown(after[attr])) out.add(name);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
return out;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
const ESTATE_READ_TYPE = "terraform_estate_outputs";
|
|
297
|
-
|
|
298
|
-
/** The names a module reads off `data.terraform_estate_outputs.<name>.values`, or undefined when it reads the whole object. */
|
|
299
|
-
function valuesRead(refs: readonly string[], name: string): Set<string> | undefined {
|
|
300
|
-
const re = new RegExp(`^data\\.${ESTATE_READ_TYPE}\\.${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\.values\\.([A-Za-z_][\\w-]*)`);
|
|
301
|
-
const read = new Set<string>();
|
|
302
|
-
for (const r of refs) {
|
|
303
|
-
const m = re.exec(r);
|
|
304
|
-
if (m) read.add(m[1]!);
|
|
305
|
-
}
|
|
306
|
-
return read.size > 0 ? read : undefined;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Module `m`'s reads of another module's estate, as terragucci writes them for
|
|
311
|
-
* a composed run: `{ upstream, data, outputs: "planned", unknown?, composed }`.
|
|
312
|
-
* `unknown` names the outputs it reads that the plan cannot know. A read of an
|
|
313
|
-
* estate no other module owns has no edge and is left out.
|
|
314
|
-
*/
|
|
315
|
-
export function estateReads(plan: Json, m: string, estates: Readonly<Record<string, string>>, rootOf: (m: string | undefined) => string): ReportRead[] {
|
|
316
|
-
const cfg = moduleConfig(plan, m);
|
|
317
|
-
if (!cfg) return [];
|
|
318
|
-
const refs = references(cfg);
|
|
319
|
-
const reads: ReportRead[] = [];
|
|
320
|
-
for (const r of Array.isArray(cfg.resources) ? cfg.resources : []) {
|
|
321
|
-
if (!isObject(r) || r.mode !== "data" || r.type !== ESTATE_READ_TYPE || typeof r.name !== "string") continue;
|
|
322
|
-
const expr = isObject(r.expressions) && isObject(r.expressions.estate) ? r.expressions.estate : undefined;
|
|
323
|
-
const estate = expr && typeof expr.constant_value === "string" ? expr.constant_value : undefined;
|
|
324
|
-
if (estate === undefined) continue;
|
|
325
|
-
const upstream = Object.keys(estates).sort().find((o) => o !== m && estates[o] === estate);
|
|
326
|
-
if (upstream === undefined) continue;
|
|
327
|
-
const read = valuesRead(refs, r.name);
|
|
328
|
-
const unknown = [...unknownOutputsOf(plan, upstream)].filter((n) => read === undefined || read.has(n)).sort();
|
|
329
|
-
reads.push({ upstream: rootOf(upstream), data: r.name, outputs: "planned", ...(unknown.length ? { unknown } : {}), composed: true });
|
|
330
|
-
}
|
|
331
|
-
return reads;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// ---------------------------------------------------------------------------
|
|
335
|
-
// Reads: Atmos `!terraform.output` between the stack's components.
|
|
336
|
-
// ---------------------------------------------------------------------------
|
|
337
|
-
|
|
338
|
-
/** What each component reads off another with `!terraform.output`: reader -> upstream -> output names. */
|
|
339
|
-
export type ComponentReads = Record<string, Record<string, string[]>>;
|
|
340
|
-
|
|
341
|
-
const unquote = (s: string): string => s.replace(/^(["'])(.*)\1$/, "$2");
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* Each component's `!terraform.output <component> [<stack>] <output>` reads in
|
|
345
|
-
* one Atmos stack manifest. The components are the keys under
|
|
346
|
-
* `components.terraform`, named by their `metadata.component` when they set
|
|
347
|
-
* one. A line scan, not a YAML parser: Atmos writes the function as a tagged
|
|
348
|
-
* scalar, one per line, which is all this reads.
|
|
349
|
-
*/
|
|
350
|
-
export function atmosOutputReads(yaml: string): ComponentReads {
|
|
351
|
-
const path: { indent: number; key: string }[] = [];
|
|
352
|
-
const found: { component: string; upstream: string; output: string }[] = [];
|
|
353
|
-
const dirOf = new Map<string, string>();
|
|
354
|
-
for (const raw of yaml.split(/\r?\n/)) {
|
|
355
|
-
const line = raw.replace(/\s+#.*$/, "");
|
|
356
|
-
if (!line.trim() || /^\s*#/.test(line)) continue;
|
|
357
|
-
const indent = line.length - line.trimStart().length;
|
|
358
|
-
const key = /^\s*(?:-\s+)?(["']?)([^"':#\s][^"':#]*?)\1\s*:(?:\s+(.*))?$/.exec(line);
|
|
359
|
-
while (path.length && path[path.length - 1]!.indent >= indent) path.pop();
|
|
360
|
-
const keys = path.map((p) => p.key);
|
|
361
|
-
const at = keys.findIndex((k, i) => k === "components" && keys[i + 1] === "terraform");
|
|
362
|
-
const component = at >= 0 ? keys[at + 2] : undefined;
|
|
363
|
-
const value = key ? (key[3] ?? "") : line.trim().replace(/^-\s+/, "");
|
|
364
|
-
if (key) {
|
|
365
|
-
if (component !== undefined && keys.length === at + 4 && keys[at + 3] === "metadata" && key[2] === "component" && value) {
|
|
366
|
-
dirOf.set(component, unquote(value.trim()));
|
|
367
|
-
}
|
|
368
|
-
path.push({ indent, key: key[2]! });
|
|
369
|
-
}
|
|
370
|
-
const call = /!terraform\.output\s+(.+)$/.exec(value);
|
|
371
|
-
if (!call || component === undefined) continue;
|
|
372
|
-
const args = call[1]!.trim().split(/\s+/).map(unquote);
|
|
373
|
-
if (args.length < 2) continue;
|
|
374
|
-
const output = /^\.?([A-Za-z_][\w-]*)/.exec(args[args.length - 1]!)?.[1];
|
|
375
|
-
if (output) found.push({ component, upstream: args[0]!, output });
|
|
376
|
-
}
|
|
377
|
-
const out: ComponentReads = {};
|
|
378
|
-
for (const f of found) {
|
|
379
|
-
const reader = dirOf.get(f.component) ?? f.component;
|
|
380
|
-
const upstream = dirOf.get(f.upstream) ?? f.upstream;
|
|
381
|
-
if (reader === upstream) continue;
|
|
382
|
-
const names = ((out[reader] ??= {})[upstream] ??= []);
|
|
383
|
-
if (!names.includes(f.output)) names.push(f.output);
|
|
384
|
-
}
|
|
385
|
-
for (const ups of Object.values(out)) for (const names of Object.values(ups)) names.sort();
|
|
386
|
-
return out;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* The `!terraform.output` reads of every stack manifest in an Atmos repo: the
|
|
391
|
-
* `.yaml`/`.yml` files under `stacks.base_path` of `<repo>/atmos.yaml`
|
|
392
|
-
* (`stacks` when it names none), joined. Empty when the repo has no atmos.yaml.
|
|
393
|
-
*/
|
|
394
|
-
export function atmosStackReads(repo: string): ComponentReads {
|
|
395
|
-
const config = join(repo, "atmos.yaml");
|
|
396
|
-
if (!existsSync(config)) return {};
|
|
397
|
-
let base = "stacks";
|
|
398
|
-
const text = readFileSync(config, "utf8");
|
|
399
|
-
const stacks = /^stacks\s*:\s*$([\s\S]*?)(?=^\S|(?![\s\S]))/m.exec(text);
|
|
400
|
-
const named = stacks ? /^\s+base_path\s*:\s*(["']?)([^"'#\s]+)\1/m.exec(stacks[1]!) : null;
|
|
401
|
-
if (named) base = named[2]!;
|
|
402
|
-
const out: ComponentReads = {};
|
|
403
|
-
const walk = (dir: string): void => {
|
|
404
|
-
let entries: import("node:fs").Dirent[];
|
|
405
|
-
try {
|
|
406
|
-
entries = readdirSync(dir, { withFileTypes: true });
|
|
407
|
-
} catch {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
for (const e of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
411
|
-
const p = join(dir, e.name);
|
|
412
|
-
if (e.isDirectory()) walk(p);
|
|
413
|
-
else if (/\.ya?ml$/.test(e.name)) {
|
|
414
|
-
for (const [reader, ups] of Object.entries(atmosOutputReads(readFileSync(p, "utf8")))) {
|
|
415
|
-
for (const [up, names] of Object.entries(ups)) {
|
|
416
|
-
const into = ((out[reader] ??= {})[up] ??= []);
|
|
417
|
-
for (const n of names) if (!into.includes(n)) into.push(n);
|
|
418
|
-
into.sort();
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
walk(join(repo, base));
|
|
425
|
-
return out;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Module `m`'s reads of the other modules' outputs that the stack wires in
|
|
430
|
-
* (`componentReads`, from Atmos's `!terraform.output`): one per upstream that
|
|
431
|
-
* is a module of this run, planned and composed, as {@link estateReads} writes
|
|
432
|
-
* them. Under choudoufu the reader is planned on the upstream's planned
|
|
433
|
-
* outputs, so `unknown` names the ones read that the plan cannot know.
|
|
434
|
-
*/
|
|
435
|
-
export function componentOutputReads(plan: Json, m: string, componentReads: ComponentReads, modules: readonly string[], rootOf: (m: string | undefined) => string): ReportRead[] {
|
|
436
|
-
const reads: ReportRead[] = [];
|
|
437
|
-
for (const [upstream, names] of Object.entries(componentReads[m] ?? {}).sort(([a], [b]) => a.localeCompare(b))) {
|
|
438
|
-
if (upstream === m || !modules.includes(upstream)) continue;
|
|
439
|
-
const unknown = [...unknownOutputsOf(plan, upstream)].filter((n) => names.includes(n)).sort();
|
|
440
|
-
reads.push({ upstream: rootOf(upstream), data: upstream, outputs: "planned", ...(unknown.length ? { unknown } : {}), why: `!terraform.output ${upstream}: ${names.join(", ")}`, composed: true });
|
|
441
|
-
}
|
|
442
|
-
return reads;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
// ---------------------------------------------------------------------------
|
|
446
|
-
// The report.
|
|
447
|
-
// ---------------------------------------------------------------------------
|
|
448
|
-
|
|
449
|
-
const COUNTED: ReadonlySet<ChangeSetAction> = new Set(["create", "update", "replace", "delete", "forget"]);
|
|
450
|
-
|
|
451
|
-
interface RawChange {
|
|
452
|
-
replace_paths?: (string | number)[][];
|
|
453
|
-
importing?: string;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
function rawChanges(plan: Json): Map<string, RawChange> {
|
|
457
|
-
const out = new Map<string, RawChange>();
|
|
458
|
-
for (const r of Array.isArray(plan.resource_changes) ? plan.resource_changes : []) {
|
|
459
|
-
if (!isObject(r)) continue;
|
|
460
|
-
const change = isObject(r.change) ? r.change : {};
|
|
461
|
-
const paths = Array.isArray(change.replace_paths) ? (change.replace_paths.filter(Array.isArray) as (string | number)[][]) : [];
|
|
462
|
-
const importing = isObject(change.importing) ? String(change.importing.id ?? change.importing.identity ?? "") : undefined;
|
|
463
|
-
out.set(`${r.address}\u0000${r.deposed ?? ""}`, { ...(paths.length > 0 ? { replace_paths: paths } : {}), ...(importing !== undefined ? { importing } : {}) });
|
|
464
|
-
}
|
|
465
|
-
return out;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
export interface TerraformReport {
|
|
469
|
-
report: Json;
|
|
470
|
-
/** The change set whose digest `report.change_set` names: what behold reads beside the report. */
|
|
471
|
-
changeSet: ChangeSetDocument;
|
|
472
|
-
/** The run's directory, relative to the project's own index: `yyyy/mm/<commit>/<stage>`. */
|
|
473
|
-
path: string;
|
|
474
|
-
row: IndexRow;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/** Where a run's report lives under its project: `yyyy/mm/<commit>/<stage>`, by the day it finished. */
|
|
478
|
-
export function runPath(commit: string, stage: ReportStage, finished: string): string {
|
|
479
|
-
const at = new Date(finished);
|
|
480
|
-
return `${at.getUTCFullYear()}/${String(at.getUTCMonth() + 1).padStart(2, "0")}/${commit}/${stage}`;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/** The report for one composed run, and its index row. Pure. */
|
|
484
|
-
export function terraformReport(input: TerraformReportInput): TerraformReport {
|
|
485
|
-
const plan = isObject(input.plan) ? input.plan : {};
|
|
486
|
-
const planner: ChangeSetPlanner = plannerForBinary(input.binary);
|
|
487
|
-
const rootDir = (input.rootDir ?? "").replace(/\/+$/, "");
|
|
488
|
-
const rootOf = (m: string | undefined): string => (m === undefined ? input.selfRoot ?? (rootDir || ".") : rootDir ? `${rootDir}/${m}` : m);
|
|
489
|
-
|
|
490
|
-
const changes = Array.isArray(plan.resource_changes) ? plan.resource_changes : [];
|
|
491
|
-
const modules = [...new Set(changes.flatMap((r) => (isObject(r) ? [topModule(String(r.module_address ?? r.address ?? ""))] : [])))];
|
|
492
|
-
// Roots in module order, the composed root's own resources (if any) last.
|
|
493
|
-
const keys = [...modules.filter((m): m is string => m !== undefined).sort(), ...(modules.includes(undefined) ? [undefined] : [])];
|
|
494
|
-
if (keys.length === 0) throw new Error("the plan has no resource changes, so there is nothing to report");
|
|
495
|
-
|
|
496
|
-
const applied = input.applied !== undefined ? stateResources(input.applied) : undefined;
|
|
497
|
-
if (input.stage === "tf-apply" && !applied) throw new Error("a tf-apply report needs the post-apply plan (applied) for the values the plan left unknown");
|
|
498
|
-
|
|
499
|
-
const slices = new Map(keys.map((m) => [m, slicePlan(plan, m)] as const));
|
|
500
|
-
const parts = keys.map((m) => terraformChangeSetPart({ member: rootOf(m), plan: slices.get(m), planner }));
|
|
501
|
-
const doc = composeChangeSet(parts);
|
|
502
|
-
const summary = groupChangeSet(doc);
|
|
503
|
-
const memberGroup = new Map<string, string>();
|
|
504
|
-
if (summary.unit === "member") for (const g of summary.groups) for (const u of g.units) memberGroup.set(u, g.id);
|
|
505
|
-
|
|
506
|
-
const prefixOf = new Map(keys.map((m) => [rootOf(m), m === undefined ? "" : `module.${m}.`] as const));
|
|
507
|
-
const moduleOf = new Map(keys.map((m) => [rootOf(m), m === undefined ? "." : `module.${m}`] as const));
|
|
508
|
-
|
|
509
|
-
const roots = doc.members.map((member) => {
|
|
510
|
-
const raw = rawChanges(slices.get(keys.find((m) => rootOf(m) === member.member)!)!);
|
|
511
|
-
const counts: Record<string, number> = {};
|
|
512
|
-
const rootChanges: Json[] = [];
|
|
513
|
-
for (const e of doc.entries as ChangeSetEntry[]) {
|
|
514
|
-
if (e.member !== member.member) continue;
|
|
515
|
-
counts[e.action] = (counts[e.action] ?? 0) + 1;
|
|
516
|
-
const r = raw.get(`${e.address}\u0000${e.deposed ?? ""}`);
|
|
517
|
-
if (e.action === "no-op" && r?.importing === undefined) continue;
|
|
518
|
-
const attributes = applied ? resolveUnknowns(e.attributes, applied.get(`${prefixOf.get(member.member)}${e.address}`)) : e.attributes;
|
|
519
|
-
rootChanges.push({
|
|
520
|
-
address: e.address,
|
|
521
|
-
type: e.type,
|
|
522
|
-
action: e.action,
|
|
523
|
-
...(e.disruption ? { disruption: e.disruption } : {}),
|
|
524
|
-
...(e.deposed !== undefined ? { deposed: e.deposed } : {}),
|
|
525
|
-
...(e.module ? { module: e.module } : {}),
|
|
526
|
-
...(e.index !== undefined ? { index: e.index } : {}),
|
|
527
|
-
attributes,
|
|
528
|
-
...(r?.replace_paths ? { replace_paths: r.replace_paths } : {}),
|
|
529
|
-
...(r?.importing !== undefined ? { importing: r.importing } : {}),
|
|
530
|
-
fold: "open",
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
const failed = member.status === "failed";
|
|
534
|
-
const group = memberGroup.get(member.member);
|
|
535
|
-
const mod = keys.find((m) => rootOf(m) === member.member);
|
|
536
|
-
const reads = mod !== undefined && input.estates ? estateReads(plan, mod, input.estates, rootOf) : [];
|
|
537
|
-
if (mod !== undefined && input.componentReads) {
|
|
538
|
-
const named = new Set(reads.map((r) => r.upstream));
|
|
539
|
-
const declared = keys.filter((k): k is string => k !== undefined);
|
|
540
|
-
for (const r of componentOutputReads(plan, mod, input.componentReads, declared, rootOf)) if (!named.has(r.upstream)) reads.push(r);
|
|
541
|
-
}
|
|
542
|
-
return {
|
|
543
|
-
path: member.member,
|
|
544
|
-
binary: { name: planner, ...(input.binaryVersion ? { version: input.binaryVersion } : {}) },
|
|
545
|
-
status: member.status,
|
|
546
|
-
...(member.error ? { error: member.error } : {}),
|
|
547
|
-
plan_digest: member.planDigest,
|
|
548
|
-
counts,
|
|
549
|
-
...(group ? { group } : {}),
|
|
550
|
-
plan: {},
|
|
551
|
-
...(reads.length > 0 ? { reads } : {}),
|
|
552
|
-
...(input.run.job_url ? { job_url: input.run.job_url } : {}),
|
|
553
|
-
changes: rootChanges,
|
|
554
|
-
highlights: [],
|
|
555
|
-
fold: rootChanges.length > 0 || failed ? "open" : "folded",
|
|
556
|
-
why: failed ? ["refused to plan"] : [],
|
|
557
|
-
composed: { wave: 1, module: moduleOf.get(member.member)! },
|
|
558
|
-
};
|
|
559
|
-
});
|
|
560
|
-
|
|
561
|
-
const groups = summary.groups.map((g) => ({
|
|
562
|
-
id: g.id,
|
|
563
|
-
...(g.resource ? { resource: g.resource } : {}),
|
|
564
|
-
units: g.units,
|
|
565
|
-
outlier: g.outlier,
|
|
566
|
-
noChanges: g.noChanges,
|
|
567
|
-
changes: g.changes,
|
|
568
|
-
...(g.extends ? { extends: g.extends } : {}),
|
|
569
|
-
...(g.plus ? { plus: g.plus } : {}),
|
|
570
|
-
destroys: g.destroys.length,
|
|
571
|
-
varies: [],
|
|
572
|
-
fold: g.destroys.length > 0 || g.outlier ? "open" : "folded",
|
|
573
|
-
why: [...(g.outlier ? ["outlier: read it on its own"] : []), ...(g.destroys.length > 0 ? [`${g.destroys.length} destroys or replacements`] : [])],
|
|
574
|
-
}));
|
|
575
|
-
|
|
576
|
-
const named: { root: string; address?: string; type?: string; action: string; deposed?: string; reason?: string }[] = [
|
|
577
|
-
...summary.destroys.map((d) => ({ root: d.member, address: d.address, type: d.type, action: d.action, ...(d.deposed ? { deposed: d.deposed } : {}) })),
|
|
578
|
-
...summary.forgets.map((d) => ({ root: d.member, address: d.address, type: d.type, action: "forget" as const })),
|
|
579
|
-
...summary.failed.map((f) => ({ root: f.member, action: "refused" as const, reason: f.reason })),
|
|
580
|
-
];
|
|
581
|
-
|
|
582
|
-
const totals = { ...doc.summary.actions } as Record<ChangeSetAction, number>;
|
|
583
|
-
const changing = new Set(doc.entries.filter((e) => COUNTED.has(e.action)).map((e) => e.member));
|
|
584
|
-
const planDigests = doc.members.map((m) => m.planDigest);
|
|
585
|
-
const failedAny = planDigests.some((d) => d === null);
|
|
586
|
-
const stage = input.stage;
|
|
587
|
-
const rootPaths = doc.members.map((m) => m.member);
|
|
588
|
-
const members = doc.members.map((m) => {
|
|
589
|
-
const planned = Object.entries(roots.find((r) => r.path === m.member)!.counts).filter(([a]) => COUNTED.has(a as ChangeSetAction)).reduce((n, [, c]) => n + c, 0);
|
|
590
|
-
return {
|
|
591
|
-
root: m.member,
|
|
592
|
-
module: moduleOf.get(m.member)!,
|
|
593
|
-
...(stage === "tf-apply" ? { apply: planned === 0 ? "no-changes" : "applied", changes: { done: planned, planned }, state: "written" } : {}),
|
|
594
|
-
};
|
|
595
|
-
});
|
|
596
|
-
const wave = {
|
|
597
|
-
number: 1,
|
|
598
|
-
roots: rootPaths,
|
|
599
|
-
set_digest: failedAny ? null : changeSetDigest(doc.members),
|
|
600
|
-
approval: "not-requested",
|
|
601
|
-
state: failedAny ? "failed" : stage === "tf-apply" ? "applied" : "planned",
|
|
602
|
-
composed: { plan_digest: failedAny ? null : changeSetDigest(doc.members), members },
|
|
603
|
-
};
|
|
604
|
-
|
|
605
|
-
const run = {
|
|
606
|
-
project: input.run.project,
|
|
607
|
-
commit: input.run.commit,
|
|
608
|
-
stage,
|
|
609
|
-
binary: planner,
|
|
610
|
-
runtime: input.runtime ?? "ci",
|
|
611
|
-
started: input.started ?? input.finished,
|
|
612
|
-
finished: input.finished,
|
|
613
|
-
...(input.run.job_url ? { job_url: input.run.job_url } : {}),
|
|
614
|
-
...(input.run.commit_url ? { commit_url: input.run.commit_url } : {}),
|
|
615
|
-
...(input.run.pull_request ? { pull_request: input.run.pull_request } : {}),
|
|
616
|
-
...(input.run.pull_request_url ? { pull_request_url: input.run.pull_request_url } : {}),
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
const report: Json = {
|
|
620
|
-
schema: REPORT_SCHEMA,
|
|
621
|
-
minor: REPORT_MINOR,
|
|
622
|
-
run,
|
|
623
|
-
change_set: doc.digest,
|
|
624
|
-
unit: summary.unit,
|
|
625
|
-
units: summary.units,
|
|
626
|
-
totals,
|
|
627
|
-
totals_roots: changing.size,
|
|
628
|
-
groups,
|
|
629
|
-
roots,
|
|
630
|
-
waves: [wave],
|
|
631
|
-
named,
|
|
632
|
-
holes: summary.holes.map((h) => ({ root: h.member, address: h.address, ...(h.type ? { type: h.type } : {}), reason: h.reason })),
|
|
633
|
-
redaction: { marker: REDACTED, values: 0 },
|
|
634
|
-
compose: { roots: rootPaths, max: rootPaths.length, wave: 1, ...(planner === "choudoufu" ? { estate: true as const } : {}) },
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
const path = runPath(input.run.commit, stage, input.finished);
|
|
638
|
-
const failed = roots.filter((r) => r.status === "failed").length;
|
|
639
|
-
const row: IndexRow = {
|
|
640
|
-
project: input.run.project,
|
|
641
|
-
commit: input.run.commit,
|
|
642
|
-
stage,
|
|
643
|
-
finished: input.finished,
|
|
644
|
-
path,
|
|
645
|
-
roots: roots.length,
|
|
646
|
-
groups: groups.length,
|
|
647
|
-
totals: { create: totals.create, update: totals.update, replace: totals.replace, delete: totals.delete },
|
|
648
|
-
refused: named.filter((n) => n.action === "refused").length,
|
|
649
|
-
failed,
|
|
650
|
-
changed: roots.filter((r) => r.status === "planned" && r.changes.length > 0).length,
|
|
651
|
-
destroys: named.filter((n) => n.action === "delete" || n.action === "replace").map((n) => `${n.root}: ${n.address}`),
|
|
652
|
-
...(stage === "tf-apply" && failed === 0 ? { applied: input.finished } : {}),
|
|
653
|
-
...(run.commit_url ? { commit_url: run.commit_url } : {}),
|
|
654
|
-
...(run.pull_request ? { pull_request: run.pull_request } : {}),
|
|
655
|
-
...(run.pull_request_url ? { pull_request_url: run.pull_request_url } : {}),
|
|
656
|
-
...(run.job_url ? { job_url: run.job_url } : {}),
|
|
657
|
-
};
|
|
658
|
-
return { report, changeSet: doc, path, row };
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
// ---------------------------------------------------------------------------
|
|
662
|
-
// The indexes.
|
|
663
|
-
// ---------------------------------------------------------------------------
|
|
664
|
-
|
|
665
|
-
/** How many rows an index keeps. */
|
|
666
|
-
export const INDEX_ROWS = 500;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* `existing` index text with `row` added: a row at the same path is replaced,
|
|
670
|
-
* newest first, an unreadable index starts again from this row.
|
|
671
|
-
*/
|
|
672
|
-
export function addToIndex(existing: string | undefined, row: IndexRow): { schema: string; reports: IndexRow[] } {
|
|
673
|
-
let reports: IndexRow[] = [];
|
|
674
|
-
if (existing) {
|
|
675
|
-
try {
|
|
676
|
-
const parsed = JSON.parse(existing) as { reports?: unknown };
|
|
677
|
-
if (Array.isArray(parsed.reports)) reports = parsed.reports as IndexRow[];
|
|
678
|
-
} catch {
|
|
679
|
-
// An unreadable index is rebuilt from this run on.
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
reports = [...reports.filter((r) => r.path !== row.path), row];
|
|
683
|
-
reports.sort((a, b) => (a.finished < b.finished ? 1 : a.finished > b.finished ? -1 : a.path < b.path ? -1 : 1));
|
|
684
|
-
return { schema: INDEX_SCHEMA, reports: reports.slice(0, INDEX_ROWS) };
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/** A place the report's files go: a key is `project/...` under the reports prefix. */
|
|
688
|
-
export interface ReportStore {
|
|
689
|
-
read(key: string): Promise<string | undefined>;
|
|
690
|
-
put(key: string, body: string): Promise<void>;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Write the run's `report.json` and `change-set.json` (the document whose
|
|
695
|
-
* digest the report names, as `chant change-set` writes it), and add its row to the project's index
|
|
696
|
-
* (`<project>/index.json`, paths relative to it) and to the prefix's
|
|
697
|
-
* (`index.json`, paths starting at the project), the two places terragucci
|
|
698
|
-
* writes. Returns the keys written.
|
|
699
|
-
*/
|
|
700
|
-
export async function writeReport(store: ReportStore, r: TerraformReport): Promise<string[]> {
|
|
701
|
-
const project = r.row.project;
|
|
702
|
-
const keys: string[] = [];
|
|
703
|
-
const put = async (key: string, value: unknown): Promise<void> => {
|
|
704
|
-
await store.put(key, JSON.stringify(value, null, 2) + "\n");
|
|
705
|
-
keys.push(key);
|
|
706
|
-
};
|
|
707
|
-
await put(`${project}/${r.path}/report.json`, r.report);
|
|
708
|
-
await put(`${project}/${r.path}/change-set.json`, r.changeSet);
|
|
709
|
-
for (const [key, path] of [[`${project}/index.json`, r.path], ["index.json", `${project}/${r.path}`]] as const) {
|
|
710
|
-
await put(key, addToIndex(await store.read(key), { ...r.row, path }));
|
|
711
|
-
}
|
|
712
|
-
return keys;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
/** A store under a local directory: what the tests and a job that uploads itself use. */
|
|
716
|
-
export function dirStore(dir: string): ReportStore {
|
|
717
|
-
return {
|
|
718
|
-
async read(key) {
|
|
719
|
-
try {
|
|
720
|
-
return readFileSync(join(dir, key), "utf8");
|
|
721
|
-
} catch {
|
|
722
|
-
return undefined;
|
|
723
|
-
}
|
|
724
|
-
},
|
|
725
|
-
async put(key, body) {
|
|
726
|
-
mkdirSync(dirname(join(dir, key)), { recursive: true });
|
|
727
|
-
writeFileSync(join(dir, key), body);
|
|
728
|
-
},
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* A store behind an HTTP address that takes unsigned `GET` and `PUT` of
|
|
734
|
-
* `<base>/<key>`: the demo's floci bucket, `http://floci:4566/<bucket>/<prefix>`.
|
|
735
|
-
* It signs nothing, so it does not write to AWS S3 or another store that asks
|
|
736
|
-
* for credentials. A 404 on read is no object.
|
|
737
|
-
*/
|
|
738
|
-
export function httpStore(base: string, fetcher: typeof fetch = fetch): ReportStore {
|
|
739
|
-
const url = (key: string): string => `${base.replace(/\/+$/, "")}/${key.split("/").map(encodeURIComponent).join("/")}`;
|
|
740
|
-
return {
|
|
741
|
-
async read(key) {
|
|
742
|
-
const res = await fetcher(url(key));
|
|
743
|
-
if (res.status === 404) return undefined;
|
|
744
|
-
if (!res.ok) throw new Error(`GET ${url(key)}: ${res.status}`);
|
|
745
|
-
return res.text();
|
|
746
|
-
},
|
|
747
|
-
async put(key, body) {
|
|
748
|
-
const res = await fetcher(url(key), { method: "PUT", headers: { "content-type": "application/json" }, body });
|
|
749
|
-
if (!res.ok) throw new Error(`PUT ${url(key)}: ${res.status}`);
|
|
750
|
-
},
|
|
751
|
-
};
|
|
752
|
-
}
|