provider_directory=~/.terraform.d/plugins/terraform.local/balhau/receita/1.0.0/darwin_amd64/ .PHONY: help help: ## Show this help. @sed -ne 's/^\([^[:space:]]*\):.*##/\1:\t/p' $(MAKEFILE_LIST) | column -t -s $$'\t' .PHONY: clean-bin clean-bin: ## Clean all the generated binaries rm -rf bin .PHONY: clean-terraform-state clean-terraform-state: ## Clean all the terraform state generated by terraform-init/terraform-apply rm -rf example/.terraform example/terraform.tfstate.backup example/.terraform.lock.hcl example/terraform.tfstate .PHONY: clean clean: clean-bin clean-terraform-state ## Clean all the generated resources .PHONY: terraform-init terraform-init: clean-terraform-state ## Execute terraform-init on example terraform directory cd example; terraform init .PHONY: terraform-apply terraform-apply: ## Execute terraform-apply on example directory cd example; terraform apply .PHONY: build build: ## Build binaries, both the backed dummy server as the terraform provider binary mkdir -p bin go build -o bin/terraform-provider-receita go build -o bin/backend api/backend.go .PHONY: install-provider install-provider: ## Install provider in the terraform plugin directory mkdir -p $(provider_directory) cp bin/terraform-provider-receita $(provider_directory) .PHONY: run-backend run-backend: build ## Start the backend web server bin/backend