plan=out.plan

SHELL := /bin/bash

$(plan):
	source ../secrets/set-env.sh && terraform plan -input=false -out $(plan)

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

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

test:
	terraform validate


rip:
	source ../secrets/set-env.sh && terraform destroy

clean:
	rm -f $(plan)

.PHONY: test build clean push rip
