Skip to content

Commit

Permalink
chore(scripts): add cmd for planing without downloading secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
hugotiburtino committed Aug 11, 2024
1 parent d1eeb29 commit ae51722
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions envs/terraform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ terraform_init: terraform_download_secrets
terraform init

.PHONY: terraform_plan
terraform_plan: terraform_download_secrets
terraform_plan: terraform_download_secrets terraform_plan_without_downloading_secrets

.PHONY: terraform_plan_without_downloading_secrets
terraform_plan_without_downloading_secrets:
terraform fmt -recursive
terraform plan -var-file secrets/terraform-$(env_name).tfvars

Expand All @@ -23,19 +26,16 @@ terraform_apply: terraform_download_secrets terraform_apply_without_downloading_

.PHONY: terraform_apply_without_downloading_secrets
terraform_apply_without_downloading_secrets:
# just make sure we know what we are doing
terraform fmt -recursive
terraform apply -var-file secrets/terraform-$(env_name).tfvars

.PHONY: terraform_destroy
terraform_destroy:
# just make sure we know what we are doing
terraform fmt -recursive
terraform destroy -var-file secrets/terraform-$(env_name).tfvars

.PHONY: terraform_download_secrets
terraform_download_secrets:
#remove secrets and load latest secret from gcloud
rm -rf secrets
gsutil -m cp -R gs://$(gcloud_env_name)_terraform/secrets/ .

Expand Down

0 comments on commit ae51722

Please sign in to comment.