Giter Club home page Giter Club logo

tpm's Introduction

Terraform Provider Manager

MIT license

Terraform Provider Manager (tpm) is a command-line interface (CLI) tool designed to simplify the management of Terraform providers in the plugin cache directory. With tpm you can easily install, uninstall, and list providers, helping you to streamline your Terraform workflow.

One of the key benefits of tpm is that it does not require Terraform to be installed, making it a lightweight and efficient tool for managing your cached providers.

Terraform Provider Manager Demo

Installation โ€ข Usage โ€ข Useful Links โ€ข License

Installation

GNU/Linux

Arch Linux from AUR (maintained by @jonathanio):

yay -S terraform-tpm-bin

macOS

Via Homebrew:

brew install madh93/tap/tpm

Windows

Via Scoop:

scoop bucket add madh93 https://github.com/madh93/scoop-bucket.git
scoop install tpm

From releases

Stable binaries for all platforms are available on the releases page. To install, download the binary for your platform from "Assets", extract the downloaded file and place tpm into your PATH:

curl -L https://github.com/Madh93/tpm/releases/latest/download/tpm_$(uname -s)_$(uname -m).tar.gz | tar -xz -O tpm > /usr/local/bin/tpm
chmod +x /usr/local/bin/tpm

Go

If you have Go installed:

go install github.com/Madh93/tpm@latest

From source

Install Go if it is not already installed. You can download it from the official website.

Clone the Terraform Provider Manager repository to build and install the binary:

git clone https://github.com/Madh93/tpm && cd tpm && make install

Usage

Terraform Provider Manager is a simple CLI to manage Terraform providers in the Terraform plugin cache directory

Usage:
  tpm [flags]
  tpm [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  install     Install a provider
  list        List all installed providers
  purge       Purge all installed providers
  uninstall   Uninstall a provider

Flags:
  -c, --config string                       config file for tpm
  -d, --debug                               enable debug mode
  -h, --help                                help for tpm
  -p, --terraform-plugin-cache-dir string   the location of the Terraform plugin cache directory (default "/home/user/.terraform.d/plugin-cache")
  -r, --terraform-registry string           the Terraform registry provider hostname (default "registry.terraform.io")
  -v, --version                             version for tpm

Use "tpm [command] --help" for more information about a command.

Install a provider

To install a provider you only need to provide the name. Optionally, you can specify a version by using <package>@<version>. By default, if no version is specified, the latest available version, also known as @latest, will be installed.

You can also specify the architecture and operating system. If not specified, the information from the system where tpm is being executed will be used.

Install a provider

In addition, it's possible to install multiple providers at once specifying a providers.yml file, making it easier to share and reuse installation requirements. For example:

providers:
  - name: hashicorp/[email protected]
  - name: hashicorp/[email protected]
    os:
      - linux
      - darwin
    arch:
      - amd64
      - arm64
  - name: hashicorp/random
    os:
      - linux
      - darwin
    arch:
      - amd64
      - arm64

Install providers from file

The providers are installed in parallel by default. You can adjust the number of parallel jobs by using the --jobs <NUMBER> flag.

List installed providers

This will display on the screen the installed providers. Optionally, you can specify an output format. Valid output formats are:

  • text (default)
  • json
  • csv
  • table

List installed providers

Uninstall a provider

Uninstalling a provider is exactly the same as installing it. You can specify both the version, operating system, and architecture.

Uninstall a provider

Purge all providers

This will delete all installed providers from the current registry.

List installed providers

Useful Links

License

This project is licensed under the MIT license.

tpm's People

Contributors

carlpett avatar chenrui333 avatar madh93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tpm's Issues

Download based on lock file

Hi, I think it would be nice to download the providers based on a specified set of .terraform.lock.hcl files instead of an own format. The hcl would need to be parsed for this, but contains the full provider name and version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.