plan=out.plan

SHELL := /bin/bash

$(plan): *.tf
	source ./secrets.sh && terraform plan -var-file variables.tfvars -input=false -out $(plan)

push: build
	source ./secrets.sh && terraform apply $(plan)

refresh:
	source ./secrets.sh && terraform apply -refresh-only

test:
	terraform validate


rip:
	source ./secrets.sh && terraform destroy

clean:
	rm -f $(plan)

.PHONY: test build clean push rip
