Skip to content

tfmodref looks for all module definitions in a terraform/terragrunt tree or single file, and lists or updates versions as requested to simplify the overhead of managing a project with many modules and many module versions.

License

Notifications You must be signed in to change notification settings

jbrailsford/tfmodref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tfmodref

tfmodref is a CLI utility for working with terraform or terragrunt files which use modules stored in semantically versioned git repositories.

Commands

list

The list command (tfmodref list) can be used to list local versions of modules in one or more files, and also retrieve the latest version in the repostiroy.

Usage

To list just local versions in the current directory and below:

tfmodref list

To list local and the latest remote version in the current directory and below:

tfmodref list --remote

To list local and the latest remote versions in a specific file:

tfmodref --path a/path/to/a/file.tf list --remote

To list local versions in a different directory tree:

tfmodref --path some/other/folder list

update

The update command can be used to update the version('s) contained in file('s).

Usage

To update all versions in the current folder and below to the latest version:

tfmodref update --latest

To see what would happen, without making any changes, when performing an update:

tfmodref update --latest --dry-run

To update all modules to a specific version within a file:

tfmodref update --version v0.1.0

To update all versions to the latest available version in the remote repository within a constraint:

tfmodref update --constraint ">0.5.0 < 2.0.x"

Contributing

Contributors are very welcome, people work with terraform and modules in many different ways, so please feel free to add any features or fixes you like.

To do

  • Support making changes in a git branch (auto branching)
  • Support targeting a specific module
  • Add tests
  • Break apart update and list command wall of code

About

tfmodref looks for all module definitions in a terraform/terragrunt tree or single file, and lists or updates versions as requested to simplify the overhead of managing a project with many modules and many module versions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages