Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installs the AWS Terraform provider to your local plugins directory
#!/bin/sh
set -eu -o pipefail
set -x
version=$1
cd terraform-provider-aws
git fetch
git checkout .
git checkout "v$version"
cd tools
go get -d github.com/pavius/impi/cmd/impi
cd ..
make tools
make build
plugin_dir="$HOME/.terraform.d/plugins/registry.terraform.io/hashicorp/aws/$version/darwin_arm64"
mkdir -p "$plugin_dir"
cp -v "$GOPATH/bin/terraform-provider-aws" "$plugin_dir/terraform-provider-aws_v${version}_x5"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment