---
next_cursor: eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6Im9wZW50b2Z1IiwidiI6MX0
has_more: false
next: https://sincecutoff.com/v1/changes.md?tool=opentofu&score=0&cursor=eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6Im9wZW50b2Z1IiwidiI6MX0
items: 3
---
# sincecutoff.com changes: opentofu

## OpenTofu commands support simultaneous UI and JSON output (opentofu, 2026-05-14)
Published 2026-10-16
- slug: opentofu-commands-support-simultaneous-ui-and-json-output-fa066f210608
- score: 0.97

How to use it:

When 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.

Examples:

```
tofu plan -json-into=<JSON_FILE>
```

- why_it_matters: Use machine-readable output to supplement the normal OpenTofu UI while implementing or debugging a tool that interprets command output.
- before: Previously, commands that supported both output formats could be run with only one or the other.
- sources: <https://github.com/opentofu/opentofu/releases/tag/v1.12.0>, <https://opentofu.org/blog/dual-command-output-streams/>, <https://opentofu.org/docs/v1.12/intro/whats-new/>
- gotchas: "Version: v1.12.0"; "-json-into=<FILENAME> (required): Writes the same machine-readable output as `-json` to the given file, allowing simultaneous human-readable and machine-readable output."; "Prerequisite: Use a command that supports both human-oriented UI and machine-readable JSON output."; "Applies to commands that support both human-oriented UI output and machine-readable JSON output."

## OpenTofu dynamic `prevent_destroy` lifecycle setting (opentofu, 2026-05-14)
Published 2026-10-16
- slug: opentofu-dynamic-prevent-destroy-lifecycle-setting-855276222c2a
- score: 0.99

How to use it:

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).

Examples:

```
variable "prevent_destroy_database" {
  type    = bool
  default = true
}

resource "example_database" "example" {
  # ...
  lifecycle {
    prevent_destroy = var.prevent_destroy_database
  }
}
```

- why_it_matters: Configure a managed resource so its destroy protection follows a module value.
- sources: <https://github.com/opentofu/opentofu/releases/tag/v1.12.0>, <https://opentofu.org/docs/v1.12/language/resources/behavior/>, <https://opentofu.org/docs/v1.12/language/values/variables/>
- gotchas: "Version: v1.12.0"; "lifecycle.prevent_destroy: Boolean lifecycle argument; when true, OpenTofu errors on plans that destroy the associated object. In v1.12.0 it can be set dynamically from same-module values."; "prevent_destroy_database: Example input variable of type `bool`; its default is true, making it optional to callers. Child-module callers pass its value in the module block."; "Prerequisite: Use OpenTofu v1.12.0 or later for dynamically defined `prevent_destroy`."; "Prerequisite: Declare any referenced input variable in the same module; the example uses `type = bool`."; "The referenced values must be available elsewhere in the same module."

## OpenTofu v1.13 includes early linting work (opentofu, 2026-09-30)
Published 2026-10-16
- slug: opentofu-v1-13-includes-early-linting-work-a1e6ef97148d
- score: 0.95

How to use it:

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.

Examples:

```
tofu validate -lint=all
```

- why_it_matters: Apply built-in linting checks to an OpenTofu configuration.
- sources: <https://github.com/opentofu/opentofu/releases/tag/v1.13.0>, <https://opentofu.org/docs/v1.13/cli/commands/validate/>, <https://opentofu.org/docs/v1.13/language/linting/>
- gotchas: "Version: v1.13"; "Availability: Experiment"; "-lint=all: Opts in to linting; accepts a comma-separated list of rule or group identifiers. `all` selects all rules. Identifiers are case-sensitive; unknown identifiers are ignored."; "Prerequisite: Use OpenTofu v1.13 or later; the documented core lint rules are marked as introduced in v1.13."; "Prerequisite: `tofu validate` requires an initialized working directory with referenced plugins and modules installed. Initialize without accessing the configured backend with `tofu init -backend=false`."; "Prerequisite: Linting is experimental and opt-in; detected issues are shown as warning diagnostics."; "The release describes the linting work as very early."

Next: https://sincecutoff.com/v1/changes.md?tool=opentofu&score=0&cursor=eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6Im9wZW50b2Z1IiwidiI6MX0
Save `next_cursor`; next visit, pass it to get only what was published since.
<!-- end of page -->
