Skip to content

Instantly share code, notes, and snippets.

@dotemacs
Created May 3, 2024 09:35
Show Gist options
  • Save dotemacs/be010e0cb033ce81aa2cd6549f4b3a61 to your computer and use it in GitHub Desktop.
Save dotemacs/be010e0cb033ce81aa2cd6549f4b3a61 to your computer and use it in GitHub Desktop.
#!/bin/sh
version="0.0.1"
what_arch=`uname -m`
if [ ${what_arch} == "x86_64" ]
then
arch="amd64"
elif [ ${what_arch} == "arm64"]
then
arch=${what_arch}
fi
os=$(uname -s | tr '[:upper:]' '[:lower:]')
go build
dest=~/.terraform.d/plugins/terraform.local/local/go/${version}/${os}_${arch}/terraform-provider-go_v${version}
mkdir -p $(dirname $dest)
cp terraform-provider-go $dest
rm -r .terraform*
tofu init -reconfigure
tofu plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment