https://github.com/stavxyz/terraform-plugin-installer
A script to manage and install terraform plugins
https://github.com/stavxyz/terraform-plugin-installer
Last synced: about 2 months ago
JSON representation
A script to manage and install terraform plugins
- Host: GitHub
- URL: https://github.com/stavxyz/terraform-plugin-installer
- Owner: stavxyz
- License: gpl-3.0
- Created: 2019-08-14T18:08:21.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2021-08-26T04:31:34.000Z (almost 4 years ago)
- Last Synced: 2025-03-19T16:11:06.644Z (2 months ago)
- Language: Shell
- Size: 32.2 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terrraform-plugin-installer
It's a script to install third party terraform plugins and providers! Hassle free! How neat is that?Installs plugins as `terraform-provider-_vX.Y.Z` to `~/.terraform.d/plugins`
See more on third party plugin installation here: https://www.terraform.io/docs/configuration/providers.html#third-party-plugins
## Requirements
1) [golang](https://golang.org/doc/install) (for `go build`)
## Features
* Install from any git repository (local or remote)
* Clones/builds in a temporary directory (using `mktemp`) and cleans up when complete
* Install any specified revision/version (branch, tag, or git sha)
* Install _as_ any version
* You can even install a revision whose git tag is a valid semver as a completely different semver, though I'm not sure why you'd want to do this :)
* Quickly test plugins in development without worrying about tagging, semvers, etc
* Behavior is sane even for terraform plugin git repositories with no branches or tags (defaults to installing `HEAD` as version 0.0.1)## Usage
```
./install.sh [ ] [ ]
```Note:
* If the `revision/tag` _**is**_ the version, supplying the `version` argument is not necessary
* If no `revision/tag` is provided, the latest release matching the semver regex (or if none, `HEAD`) will be built and installed.## Example
### Install a release
```
./install.sh github.com/samstav/terraform-provider-mailgunv3 v0.3.2
```### Install version specified from git sha
```
# In this example, v0.3.2 can be any version you'd like to install 3fafde7597 as
./install.sh github.com/samstav/terraform-provider-mailgunv3 3fafde7597 v0.3.2
```### Terraform configuration
```
...provider "mailgunv3" {
version = ">=0.3.2"
}```
## If you like `curl`ing to `sh`
```
curl https://raw.githubusercontent.com/stavxyz/terraform-plugin-installer/main/install.sh | bash -s -- github.com/phillbaker/terraform-provider-mailgunv3
```