---
title: "TERRAFORM .GITIGNORE"
category: SNIPPETS
date: 2026-11-04
version: "1.0"
format: "TXT"
size: "1.2 KB"
license: "CC0-1.0"
sha256: 9a28c8ff77f38c3117921615ff1a09cc15626f80af54cfd33e30db52c1b78215
source: "https://github.com/github/gitignore/blob/main/Terraform.gitignore"
download: "https://original.wales/files/snippets/terraform.gitignore"
tags: ["GITIGNORE","GIT","TERRAFORM","OFFICIAL"]
summary: "GitHub’s official Terraform .gitignore template."
canonical: "https://original.wales/files/gitignore-terraform/"
---

# TERRAFORM .GITIGNORE

GitHub’s official Terraform .gitignore template.

## TEXT

# Local .terraform directories
.terraform/

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Ignore transient lock info files created by terraform apply
.terraform.tfstate.lock.info

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc

# Optional: ignore graph output files generated by `terraform graph`
# *.dot

# Optional: ignore plan files saved before destroying Terraform configuration
# Uncomment the line below if you want to ignore planout files.
# planout

## SOURCE

https://github.com/github/gitignore/blob/main/Terraform.gitignore
