Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dirien/tfu
tfu is a terraform helper to update the providers.
https://github.com/dirien/tfu
iac infrastructure-as-code terraform
Last synced: 24 days ago
JSON representation
tfu is a terraform helper to update the providers.
- Host: GitHub
- URL: https://github.com/dirien/tfu
- Owner: dirien
- License: apache-2.0
- Created: 2021-07-23T05:20:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-15T01:10:14.000Z (5 months ago)
- Last Synced: 2024-06-19T06:00:03.880Z (5 months ago)
- Topics: iac, infrastructure-as-code, terraform
- Language: Go
- Homepage:
- Size: 413 KB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[![codecov](https://codecov.io/gh/dirien/tfu/branch/main/graph/badge.svg?token=ZPXEUC4NFQ)](https://codecov.io/gh/dirien/tfu)
![Terraform](https://img.shields.io/badge/Terraform-7B42BC?style=for-the-badge&logo=terraform&logoColor=white)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/dirien/tfu/badge?style=for-the-badge)](https://api.securityscorecards.dev/projects/github.com/dirien/tfu)# tfu (speak 'TF-up')
`tfu` is a Terraform helper to update the providers of [Terraform](https://registry.terraform.io/browse/providers)
Works only starting from version Terraform 0.13+
_Nothing more nothing less._
## Why? đ€·
After a Terraform session with [Nico Meisenzahl](https://github.com/nmeisenzahl), we thought about a way to
automatically update the different provisioner.Right now you need to call the [Terraform Registry](https://registry.terraform.io/) website and look them up. That is so
time-consuming. This was moment the idea đĄ `tfu` for was born.### TL;DR đ
Install via homebrew:
```bash
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](https://github.com/dirien/tfu/releases).### 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:
```bash
tfu update -d [--dry-run]
```For a single file
```bash
tfu update -f [--dry-run]
```Example:
```bash
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