From fb492be3cb17cef73aef4438463225e5004434c1 Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Sun, 10 Oct 2021 03:17:55 +0200 Subject: [PATCH] terraform: Fix cleanup of tfstate backups Terraform leaves timestamp-based tfstate backups in the terraform directory, which don't need to remain after a destroy. This patch fixes the problem by adding the remaining files to the cleanup command ran after `terraform destory`. --- terraform/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/Makefile b/terraform/Makefile index 702fa7bb7..7aa287a1b 100644 --- a/terraform/Makefile +++ b/terraform/Makefile @@ -29,4 +29,4 @@ apply: preflight init ## Deploy the base infrastructure using terraform destroy: preflight init ## Tear down deployed the infrastructure terraform destroy ${TERRAFORM_PARAMETERS} # Cleanup remaining files - rm -rf .terraform .terraform terraform.tfstate terraform.tfstate.backup + rm -rf .terraform .terraform terraform.tfstate terraform.tfstate.backup terraform.tfstate.*.backup -- GitLab