Created
June 22, 2021 03:46
-
-
Save datfinesoul/0635049e81d3d73ed9c7a5d677851d22 to your computer and use it in GitHub Desktop.
Drift Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL=/bin/bash | |
scan: | |
@driftctl scan \ | |
--from "tfstate+tfcloud://$(shell <".tfcloud/.wsid" cat)" \ | |
--tfc-token "$(shell <"${HOME}/.terraform.d/credentials.tfrc.json" jq -r '.credentials."app.terraform.io".token')" | |
ignore: | |
@driftctl scan \ | |
--from "tfstate+tfcloud://$(shell <".tfcloud/.wsid" cat)" \ | |
--tfc-token "$(shell <"${HOME}/.terraform.d/credentials.tfrc.json" jq -r '.credentials."app.terraform.io".token')" \ | |
--output json://drift.json \ | |
|| true | |
driftctl gen-driftignore --input drift.json > .driftignore | |
clean: | |
rm -f drift.json .driftignore | |
.PHONY: scan ignore clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment