From dca471d597d33cb100db03c586388762baabd4c7 Mon Sep 17 00:00:00 2001 From: Han Tuzun Date: Sun, 29 Oct 2017 22:26:00 +0200 Subject: [PATCH] Update Terraform.gitignore Improvements: * `.terraform` directories could be created in any subdirectory when user runs `terraform init`. * Quite an interesting variations of`.tfstate` files are created by Terraform such as `.*.tfstate.d` or `.*.tfstate.lock.info`. It's best not to name any file with `*.tfstate.*` pattern. * `*.tfvars` files often contain private data and not supposed to be committed. --- Terraform.gitignore | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Terraform.gitignore b/Terraform.gitignore index 9b5aebb1..1fef4ab9 100644 --- a/Terraform.gitignore +++ b/Terraform.gitignore @@ -1,10 +1,9 @@ -# Compiled files +# Local .terraform directories +**/.terraform/* + +# .tfstate files *.tfstate -*.tfstate.*.backup -*.tfstate.backup +*.tfstate.* -# Module directory -.terraform/ - -# Variable values for development -terraform.tfvars +# .tfvars files +*.tfvars