Skip to content

Commit dca471d

Browse files
authored
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.
1 parent 982268d commit dca471d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Terraform.gitignore

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# Compiled files
2-
*.tfstate
3-
*.tfstate.*.backup
4-
*.tfstate.backup
1+
# Local .terraform directories
2+
**/.terraform/*
53

6-
# Module directory
7-
.terraform/
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
87

9-
# Variable values for development
10-
terraform.tfvars
8+
# .tfvars files
9+
*.tfvars

0 commit comments

Comments
 (0)