Skip to content

Add OpenTofu support to tf-sort and tfplan-all - #14

Merged
skoonin merged 4 commits into
mainfrom
opentofu-support
Sep 24, 2026
Merged

skoonin merged 4 commits into
mainfrom
opentofu-support

Conversation

@skoonin

@skoonin skoonin commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Adds OpenTofu support with no behavior change for Terraform users.

  • tfplan-all: -t/--tofu or TFPLAN_ALL_BIN=tofu runs tofu. The default stays terraform, with no auto-detection. tofu runs also plan .tofu directories. Output adds one Binary: line.
  • tf-sort: sorts .tofu files and language/ephemeral/action blocks. Files that contain these blocks re-sort once.
  • Fixes: tf-sort d1 d2 processed only d1; block state leaked between files in directory mode; tfplan-all found nothing when the target was under a .terraform directory.
  • CI runs a new tf-sort smoke test on Ubuntu and macOS.

After merge: tag tf-sort/v1.1.0 and tfplan-all/v1.1.0.

Sort .tofu files and language/ephemeral/action blocks; fix only the first argument being processed and block state leaking between files.
Default stays terraform; tofu runs also scan .tofu files. Fix .terraform exclusion when the target is under a .terraform directory.
@skoonin
skoonin merged commit 455fdd2 into main Sep 24, 2026
3 checks passed
@skoonin
skoonin deleted the opentofu-support branch September 24, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant