Skip to content

Commit ea481a2

Browse files
committed
generate plan then deploy
1 parent f12f652 commit ea481a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,16 @@ local:
5858
deploy_prod: check_account_prod
5959
@echo "Deploying Terraform..."
6060
terraform -chdir=terraform/envs/prod init -lockfile=readonly
61-
terraform -chdir=terraform/envs/prod apply -auto-approve
61+
terraform -chdir=terraform/envs/qa plan -out=tfplan
62+
terraform -chdir=terraform/envs/prod apply -auto-approve tfplan
63+
rm tfplan
6264

6365
deploy_dev: check_account_dev
6466
@echo "Deploying Terraform..."
6567
terraform -chdir=terraform/envs/qa init -lockfile=readonly
66-
terraform -chdir=terraform/envs/qa apply -auto-approve
68+
terraform -chdir=terraform/envs/qa plan -out=tfplan
69+
terraform -chdir=terraform/envs/qa apply -auto-approve tfplan
70+
rm tfplan
6771

6872
init_terraform:
6973
terraform -chdir=terraform/envs/qa init

0 commit comments

Comments
 (0)