-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a13aa46
commit ca4b45b
Showing
9 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Auto-generated by sicc. Do not edit | ||
# Make improvements in sicc, so that everyone can benefit. | ||
|
||
TF_VARS := $(patsubst %,-e%,$(filter TF_VAR_%,$(.VARIABLES))) | ||
REPO_ROOT := $(shell git rev-parse --show-toplevel) | ||
REPO_RELATIVE_PATH := $(shell git rev-parse --show-prefix) | ||
# We need to do this because `terraform fmt` recurses into .terraform/modules | ||
# and wont' accept more than one file at a time. | ||
TF=$(wildcard *.tf) | ||
|
||
docker_base = \ | ||
docker run -it --rm -e HOME=/home -v $$HOME/.aws:/home/.aws -v $(REPO_ROOT):/repo \ | ||
-e GIT_SSH_COMMAND='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \ | ||
-e TF_PLUGIN_CACHE_DIR="/repo/.terraform.d/plugin-cache" -e TF="$(TF)" \ | ||
-w /repo/$(REPO_RELATIVE_PATH) $(TF_VARS) $$($(REPO_ROOT)/scripts/docker-ssh-mount.sh) | ||
docker_terraform = $(docker_base) hashicorp/terraform:{{ .TerraformVersion }} | ||
docker_sh = $(docker_base) --entrypoint='/bin/sh' hashicorp/terraform:{{ .TerraformVersion }} | ||
|
||
all: fmt lint doc | ||
|
||
fmt: | ||
@$(docker_sh) -c "for f in $(TF); do printf '.'; terraform fmt $$f; done"; \ | ||
echo | ||
|
||
lint: lint-tf | ||
|
||
lint-tf: | ||
@$(docker_sh) -c "for f in $(TF); do printf '.'; terraform fmt --check=true --diff=true $$f || exit $$? ; done"; \ | ||
echo | ||
|
||
readme: | ||
bash .update-readme.sh update | ||
|
||
docs: readme | ||
|
||
check-docs: | ||
@bash .update-readme.sh check; \ | ||
if [ ! $$? -eq 0 ]; then \ | ||
echo "Docs are out of date, run \`make docs\`"; \ | ||
fi | ||
|
||
clean: | ||
|
||
test: | ||
|
||
.PHONY: all check-doc clean docs fmt lint lint-tf readme test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!-- START --> | ||
<!-- END --> |
Empty file.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Auto-generated by sicc. Do not edit | ||
# Make improvements in sicc, so that everyone can benefit. | ||
|
||
terraform { | ||
required_version = "~>{{ .TerraformVersion }}" | ||
} |
Empty file.
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