Skip to content

Files

Latest commit

52a17fb · Aug 22, 2024

History

History
53 lines (36 loc) · 1.39 KB

terraform.md

File metadata and controls

53 lines (36 loc) · 1.39 KB
description title layout
The command line interface to Terraform is the terraform command, which accepts a variety of subcommands such as terraform validate or terraform fmt
Trunk | How to run Terraform
title description tableOfContents outline pagination
visible
true
visible
visible
true
visible
true
visible
true

Terraform

Terraform is a formatter for Terraform.

You can enable the Terraform formatter with:

trunk check enable terraform

Auto Enabling

Terraform will never be auto-enabled. It must be enabled manually.

Usage Notes

We currently support terraform validate and terraform fmt, but only fmt is enabled by default when you add terraform to your enabled list in trunk.yaml. To enable validate, add this to your trunk.yaml:

lint:
  enabled:
    - terraform@<version>:
        commands: [validate, fmt]

Note: you must run terraform init before running trunk check with terraform validate enabled (both locally, or on CI).

Links