trevor159/drift-fixer
Detect and automatically fix Terraform/OpenTofu configuration drift, then commit or open a PR with the fixes.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| path | Path to the Terraform/OpenTofu project directory. | no | . |
| tf-bin | Terraform/OpenTofu binary to use (e.g. tofu or terraform). | no | tofu |
| verbose | Print every attribute and block change as it is applied. | no | false |
| mode | What to do after fixing drift. Options: pr — open a pull request with the changes (default) commit — commit and push directly to the current branch dry-run — detect and report drift without writing any files or opening a PR | no | pr |
| pr-branch | Branch name to use when mode is 'pr'. Defaults to drift-fixer/fix-<run_id>. | no | "" |
| pr-title | Title of the pull request when mode is 'pr'. | no | fix: sync Terraform config with infrastructure drift |
| commit-message | Commit message used for both 'commit' and 'pr' modes. | no | fix: sync Terraform config with infrastructure drift |
| token | GitHub token used to push branches and open PRs. Defaults to the built-in GITHUB_TOKEN. | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| drift-detected | 'true' if any drift was found, 'false' otherwise. |
| pr-url | URL of the pull request opened when mode is 'pr' (empty otherwise). |