Skip to content

Commit

Permalink
Require terraform plan
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Oct 18, 2024
1 parent 2eb4c43 commit 34086e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.DS_Store
.env*
!.env.template
.last_used_env
.last_used_env
.tfplan
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ init:
plan:
@ printf "Planning Terraform for env: `tput setaf 2``tput bold`$(ENV)`tput sgr0`\n\n"
terraform fmt -recursive
$(tf_vars) terraform plan -compact-warnings -detailed-exitcode $(ALL_MODULES_ARGS)
$(tf_vars) terraform plan -out=.tfplan -compact-warnings -detailed-exitcode $(ALL_MODULES_ARGS)

.PHONY: apply
apply:
Expand All @@ -60,7 +60,9 @@ apply:
-auto-approve \
-input=false \
-compact-warnings \
-parallelism=20 $(ALL_MODULES_ARGS)
-parallelism=20 \
.tfplan
@ rm .tfplan

.PHONY: plan-without-jobs
plan-without-jobs:
Expand Down

0 comments on commit 34086e3

Please sign in to comment.