Skip to content

abyss/tfwand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tfwand

wand is an OpenTofu/Terraform utility toolkit. It provides commands for pinning module versions across your codebase and running plan/apply operations across multiple directories.

Installation

brew install abyss/tools/tfwand

Or build from source:

go install github.com/abyss/tfwand@latest

Usage

Pin module versions

Update a specific module path to a new version:

wand pin module network v2.1.0
wand pin module aws/vpc v1.3.0

Update all references to a repository regardless of subdirectory:

wand pin repo my-modules v3.0.0

Plan

Summarise tf plan output across multiple directories:

wand plan all          # all directories containing .tf files
wand plan git          # directories with git changes
wand plan staged       # directories with staged git changes
wand plan dir ./prod   # a single directory

Use --exclude to skip directories matching a prefix (repeatable):

wand plan all --exclude prod
wand plan all --exclude prod --exclude staging/legacy

Apply

Run tf init + tf apply across multiple directories:

wand apply all         # all directories containing .tf files
wand apply git         # directories with git changes
wand apply staged      # directories with staged git changes
wand apply dir ./prod  # a single directory

Use --exclude to skip directories matching a prefix (repeatable):

wand apply all --exclude prod
wand apply git --exclude prod --exclude staging/legacy

Options

The tf binary defaults to tf. Override with a flag or environment variable:

wand --tf tofu plan all
WAND_TF_BIN=terraform wand plan all

About

OpenTofu/Terraform utility toolkit - cast spells on your infrastructure as code!

Resources

License

Stars

Watchers

Forks

Contributors

Languages