Last active
November 9, 2016 12:18
-
-
Save mtpereira/f18ea33727b05c06c6e9399d3cdd6093 to your computer and use it in GitHub Desktop.
terraform ejson
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
*.tfvars |
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
TARGETS = get plan apply clean destroy | |
.PHONY: $(TARGETS) | |
EJSON = ejson --keydir ~/.ejson/keys | |
get: | |
terraform get | |
variables.tfvars: variables.tfvars.ejson | |
$(EJSON) decrypt varaiables.tfvars.ejson -o variables.tfvars | |
plan: get variables.tfvars | |
terraform plan -var-file variables.tfvars -out plan | |
apply: | |
terraform apply variables.plan | |
destroy: get variables.tfvars | |
terraform destroy -var-file variables.tfvars | |
clean: | |
rm -f variables.tfvars plan |
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
{ | |
"_public_key": "__OUTPUT_FROM_EJSON_KEYGEN__", | |
"foo": "bar" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment