forked from cloudposse-archives/reference-architectures
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
31 lines (24 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Import the cloudposse/build-harness
include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)
include tasks/Makefile.*
# Run time environment passed to terraform
export TF_VAR_artifacts_dir ?= $(CURDIR)/artifacts
export TF_VAR_repos_dir ?= $(CURDIR)/repos
export TF_VAR_templates_dir ?= $(CURDIR)/templates
# The target called when calling `make` with no arguments
export DEFAULT_HELP_TARGET = help/short
# The command we'll use to start the container
export DOCKER_RUN = docker run --rm --privileged -it -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e SSH_KEY=false \
-v $(CURDIR)/artifacts:/artifacts -v $(CURDIR)/scripts:/scripts \
-v $(HOME):/localhost -e LOCAL_HOME=$(HOME)
# The directory containing configs
export CONFIGS ?= configs
## Clean up
clean::
rm -rf repos accounts .terraform *.tfstate* artifacts/*
## Format all terraform code
fmt:
find $(CONFIGS) -type f -name '*.tfvars' -exec terraform fmt {} \;
terraform fmt modules
finalize: root/finalize children/finalize
@exit 0