Skip to content
Snippets Groups Projects
Verified Commit fb492be3 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

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`.
parent 6880a366
Branches
Tags
No related merge requests found
...@@ -29,4 +29,4 @@ apply: preflight init ## Deploy the base infrastructure using terraform ...@@ -29,4 +29,4 @@ apply: preflight init ## Deploy the base infrastructure using terraform
destroy: preflight init ## Tear down deployed the infrastructure destroy: preflight init ## Tear down deployed the infrastructure
terraform destroy ${TERRAFORM_PARAMETERS} terraform destroy ${TERRAFORM_PARAMETERS}
# Cleanup remaining files # Cleanup remaining files
rm -rf .terraform .terraform terraform.tfstate terraform.tfstate.backup rm -rf .terraform .terraform terraform.tfstate terraform.tfstate.backup terraform.tfstate.*.backup
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment