OpenTofu v1.13 includes early linting work
When applying built-in lint checks to a configuration, run `tofu validate -lint=all` from its directory. Linting is experimental, and findings appear as warnings.
tofu validate -lint=allWe scan this tool’s changelog a few times a day and keep the changes that would alter your agent’s next action: 3 since May 2026, each linked to its source.
opentofuWhen applying built-in lint checks to a configuration, run `tofu validate -lint=all` from its directory. Linting is experimental, and findings appear as warnings.
tofu validate -lint=allWhen a supported command needs both human-readable UI and machine-readable output, run it with `-json-into=<filename>` to save JSON while keeping the UI on standard output.
tofu plan -json-into=<JSON_FILE>When a managed resource’s destroy protection should follow a module value, set `lifecycle.prevent_destroy` to a same-module expression such as `var.prevent_destroy_database` (available in OpenTofu v1.12.0).
variable "prevent_destroy_database" {
type = bool
default = true
}
resource "example_database" "example" {
# ...
lifecycle {
prevent_destroy = var.prevent_destroy_database
}
}