Created
March 7, 2021 22:49
-
-
Save jhanley-com/3080e82e124406621a8b30018825c632 to your computer and use it in GitHub Desktop.
Windows batch script to cleanup a Terraform project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF exist .terraform (rd /s /q .terraform) | |
IF exist terraform.tfstate.d (rd /s /q terraform.tfstate.d) | |
IF exist .terraform.lock.hcl (del .terraform.lock.hcl) | |
IF exist terraform.tfstate (del terraform.tfstate) | |
IF exist terraform.tfstate.backup (del terraform.tfstate.backup) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script is used in my article about Terraform, Google Cloud DNS and Cloud IAM.
https://www.jhanley.com/terraform-experiments-with-google-cloud-dns-and-iam/