Created
May 27, 2017 21:44
-
-
Save kjlape/ddbb428379e5f8508d6f92debffb478a to your computer and use it in GitHub Desktop.
Docker container to validate a terraform config with multiple/nested modules
This file contains hidden or 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
| version: "3" | |
| services: | |
| validate: | |
| build: . | |
| working_dir: /src | |
| volumes: | |
| - ".:/src" |
This file contains hidden or 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
| FROM hashicorp/terraform:light | |
| MAINTANER "Kaleb Lape <[email protected]>" | |
| RUN apk add --update bash | |
| ENTRYPOINT bash -c 'find . -type f -name "*.tf" -print0 | xargs -0 -n 1 dirname | sort | uniq | xargs -t -n 1 terraform validate' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment