Skip to content
InfraChallenge Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Validation

What was checked, with which versions, and what has not been run.

These checks ran during authoring with Terraform v1.17.2 and hashicorp/aws v6.73.0, with no AWS credentials.

Check Result
terraform fmt -check -recursive infrastructure exit 0
terraform -chdir=infrastructure/bootstrap init -backend=false and validate valid
terraform -chdir=infrastructure/envs/{dev,staging,prod} init -backend=false and validate. These load all five modules. valid ×3
terraform test with mock_provider "aws" and command = plan, once per environment, in a scratch copy outside the repository (not committed) 1 passed ×3

Not run

  • not run terraform plan and apply against AWS
  • not run A Trivy configuration scan of infrastructure/. No workflow runs one. The Trivy scan in CI covers the server image only; see Quality gates.

Run in CI

The terraform job in .github/workflows/ci.yml runs terraform fmt -check -recursive, terraform validate on bootstrap, github and the three environments, and tflint --recursive (v0.66.0, pinned by digest) on every change under infrastructure/. tflint also passes locally on the current code. The server-image job scans the production image with Trivy. Results are on Quality gates.

Run the checks yourself

cd infrastructure
terraform fmt -check -recursive .
for d in bootstrap github envs/dev envs/staging envs/prod; do
  terraform -chdir=$d init -backend=false
  terraform -chdir=$d validate
done
docker run --rm -v "$PWD/..:/data" -w /data/infrastructure \
  ghcr.io/terraform-linters/tflint:v0.66.0@sha256:65b9944a9274c4989492c1d79998c2801664bf8a55fddb4bd3a9e6d73a006ddc \
  --recursive

Was this page helpful?