-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (45 loc) · 1.5 KB
/
Makefile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PHONY: test dev
test:
#
# Build Local Mirror
#
-rm -rf ./mirror1 ./app1/terraform.d
terraform -chdir=./providermirror1 \
providers mirror -platform=linux_amd64 ../mirror1/terraform/plugins
#
# copy mirror files to local default plugin directorty
#
cp -r ./mirror1/terraform ./app1/terraform.d
#
# Test without -chdir and local plugin directory
#
-rm -rf ./app1/.terraform ./app1/terraform.tfstate ./app1/.terraform.tfstate.lock.info ./app1/.terraform.lock.hcl
cd ./app1 && TF_LOG=trace terraform init
#
# Test with -chdir and local plugin directory
#
-rm -rf ./app1/.terraform ./app1/terraform.tfstate ./app1/.terraform.tfstate.lock.info ./app1/.terraform.lock.hcl
TF_LOG=trace terraform -chdir=./app1 init
dev:
#
# Build Local Mirror
#
-rm -rf ./mirror1 ./app1/terraform.d
terraform-dev -chdir=./providermirror1 \
providers mirror -platform=linux_amd64 ../mirror1/terraform/plugins
#
# copy mirror files to local default plugin directorty
#
cp -r ./mirror1/terraform ./app1/terraform.d
#
# Test without -chdir and local plugin directory
#
-rm -rf ./app1/.terraform ./app1/terraform.tfstate ./app1/.terraform.tfstate.lock.info ./app1/.terraform.lock.hcl
# cd ./app1 && TF_LOG=trace terraform-dev init
cd ./app1 && terraform-dev init
#
# Test with -chdir and local plugin directory
#
-rm -rf ./app1/.terraform ./app1/terraform.tfstate ./app1/.terraform.tfstate.lock.info ./app1/.terraform.lock.hcl
# TF_LOG=trace terraform-dev -chdir=./app1 init
terraform-dev -chdir=./app1 init