Makefile
KERNEL_NAME := $(shell uname -s | tr '[:upper:]' '[:lower:]')
TERRAFORM_GSUITE_VERSION := 0.1.35
GOOGLE_CLOUD_SDK_VERSION := 245.0.0
# https://github.com/DeviaVir/terraform-provider-gsuite
terraform-provider-gsuite: ## Install terraform-provider-gsuite
mkdir -p $(HOME)/.terraform.d/plugins
curl -s -L -o ./terraform-provider-gsuite.tgz https://github.com/DeviaVir/terraform-provider-gsuite/releases/download/v$(TERRAFORM_GSUITE_VERSION)/terraform-provider-gsuite_$(TERRAFORM_GSUITE_VERSION)_$(KERNEL_NAME)_amd64.tgz
tar xvfz ./terraform-provider-gsuite.tgz
mv terraform-provider-gsuite_v$(TERRAFORM_GSUITE_VERSION) $(HOME)/.terraform.d/plugins/terraform-provider-gsuite
rm terraform-provider-gsuite.tgz
# https://cloud.google.com/sdk/docs/
google-cloud-sdk:
curl -s -L -o ./google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$(GOOGLE_CLOUD_SDK_VERSION)-linux-x86_64.tar.gz
tar xvfz ./google-cloud-sdk.tar.gz -C $(HOME)/
rm ./google-cloud-sdk.tar.gz
$(HOME)/google-cloud-sdk/install.sh
mkdir -p $(HOME)/.gcloud/
install: terraform-provider-gsuite google-cloud-sdk ## Install
PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help