tfu
tfu copied to clipboard
tfu is a terraform helper to update the providers.
tfu (speak 'TF-up')
tfu
is a Terraform helper to update the providers of Terraform
Works only starting from version Terraform 0.13+
Nothing more nothing less.
Why? đ€·
After a Terraform session with Nico Meisenzahl, we thought about a way to automatically update the different provisioner.
Right now you need to call the Terraform Registry website and look them up. That is so
time-consuming. This was moment the idea đĄ tfu
for was born.
TL;DR đ
Install via homebrew:
brew tap dirien/homebrew-dirien
brew install tfu
Linux or Windows user, can directly download (or use curl
/wget
) the binary via
the release page.
Usage â
So simple that downloading the cli will take you longer!
GitHub Token
tfu
supports private modules hosted on github. To not run into a rate limit:
403 API rate limit exceeded for xxxxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 16m17s]
Please set the env variable:
export GIT_TOKEN=xxx
For more details on module sources -> https://www.terraform.io/docs/language/modules/sources.html#github
For directory:
tfu update -d <directory> [--dry-run]
For a single file
tfu update -f <path to file> [--dry-run]
Example:
tfu update -d /Users/dirien/Tools/repos/stackit-minecraft/
đ Start scanning for TF providers... âąż
đ Scanning finished...
FILE | PROVIDER (P) / MODULE (M) | USED VERSION | LATEST VERSION | UPDATABLE
----------+-------------------------------------------------------------------------------------------------------------+--------------+----------------+------------
main.tf | [email protected]:rackspace-infrastructure-automation/aws-terraform-asg_instance_replacement//?ref=v0.12.0 (M) | 0.12.0 | 0.12.1 | true
main.tf | [email protected]:rackspace-infrastructure-automation/aws-terraform-vpc_basenetwork//?ref=v0.12.1 (M) | 0.12.1 | 0.12.7 | true
main.tf | [email protected]:rackspace-infrastructure-automation/aws-terraform-security_group//?ref=v0.12.0 (M) | 0.12.0 | 0.12.3 | true
main.tf | [email protected]:rackspace-infrastructure-automation/aws-terraform-ec2_asg//?ref=v0.12.1 (M) | 0.12.1 | 0.12.15 | true
main.tf | [email protected]:rackspace-infrastructure-automation/aws-terraform-ec2_asg//?ref=v0.12.1 (M) | 0.12.1 | 0.12.15 | true
main.tf | hashicorp/consul/aws (M) | 0.1.0 | 0.11.0 | true
main.tf | hashicorp/oci (P) | 4.31.0 | 4.40.0 | true
Contributing đ€
Contributing via GitHub
Feel free to join.
License
Apache License, Version 2.0
Libraries & Tools đ„
- https://github.com/fatih/color
- https://github.com/go-resty/resty
- https://github.com/hashicorp/go-version
- https://github.com/hashicorp/hcl
- https://github.com/olekukonko/tablewriter
- https://github.com/spf13/cobra