Skip to content

Commit 2c9b53e

Browse files
ostermanjoshmyers
authored andcommitted
[*/Makefile] include Makefile.* (#92)
* Update makefiles with include * Use native terraform with tfenv
1 parent 11a275c commit 2c9b53e

File tree

27 files changed

+94
-33
lines changed

27 files changed

+94
-33
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ We recommend that you start with your clean `terraform-root-module` repo. Then s
6767
Here's a good example of a `Makefile` for a terraform project:
6868

6969
```
70+
-include Makefile.*
71+
7072
## Initialize terraform remote state
7173
init:
72-
[ -f .terraform/terraform.tfstate ] || init-terraform
74+
[ -f .terraform/terraform.tfstate ] || terraform $@
7375
7476
## Clean up the project
7577
clean:

README.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ introduction: |-
102102
Here's a good example of a `Makefile` for a terraform project:
103103
104104
```
105+
-include Makefile.*
106+
105107
## Initialize terraform remote state
106108
init:
107-
[ -f .terraform/terraform.tfstate ] || init-terraform
109+
[ -f .terraform/terraform.tfstate ] || terraform $@
108110
109111
## Clean up the project
110112
clean:

aws/account-dns/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
-include Makefile.*
2+
13
## Initialize terraform remote state
24
init:
3-
[ -f .terraform/terraform.tfstate ] || init-terraform
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
46

57
## Clean up the project
68
clean:

aws/account-settings/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
-include Makefile.*
2+
13
## Initialize terraform remote state
24
init:
3-
[ -f .terraform/terraform.tfstate ] || init-terraform
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
46

57
## Clean up the project
68
clean:

aws/accounts/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
-include Makefile.*
2+
13
## Initialize terraform remote state
24
init:
3-
[ -f .terraform/terraform.tfstate ] || init-terraform
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
46

57
## Clean up the project
68
clean:

aws/acm-cloudfront/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
-include Makefile.*
2+
13
## Initialize terraform remote state
24
init:
3-
[ -f .terraform/terraform.tfstate ] || init-terraform
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
46

57
## Clean up the project
68
clean:

aws/acm/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
-include Makefile.*
2+
13
## Initialize terraform remote state
24
init:
3-
[ -f .terraform/terraform.tfstate ] || init-terraform
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
46

57
## Clean up the project
68
clean:

aws/artifacts/Makefile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
plan:
2-
@tfenv terraform $@
1+
-include Makefile.*
32

4-
apply:
5-
@tfenv terraform $@
3+
## Initialize terraform remote state
4+
init:
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
66

7-
destroy:
8-
@tfenv terraform $@
7+
## Clean up the project
8+
clean:
9+
rm -rf .terraform *.tfstate*
10+
11+
## Pass arguments through to terraform which require remote state
12+
apply console destroy graph plan output providers show: init
13+
terraform $@
14+
15+
## Pass arguments through to terraform which do not require remote state
16+
get fmt validate version:
17+
terraform $@

aws/audit-cloudtrail/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
-include Makefile.*
2+
13
## Initialize terraform remote state
24
init:
3-
[ -f .terraform/terraform.tfstate ] || init-terraform
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
46

57
## Clean up the project
68
clean:

aws/backing-services/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
-include Makefile.*
2+
13
## Initialize terraform remote state
24
init:
3-
[ -f .terraform/terraform.tfstate ] || init-terraform
5+
[ -f .terraform/terraform.tfstate ] || terraform $@
46

57
## Clean up the project
68
clean:

0 commit comments

Comments
 (0)