GitIgnore File for terraform

Create a .gitignore file to tell git which files or folders to ignore in your terraform project.

# Created by https://Shodkk.com/create-gitignore (Shantanu Bombatkar) SirDeploy Package
# It helps deploy fakeserver ReactApp on Heroku and Github Pages
#  Hope it helps || Thanks for Using SirDeploy Package

### Terraform ###
# 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

# 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

 # Star the Repo https://github.com/shaantanu9/SirDeploy
# https://www.linkedin.com/in/shantanu-bombatkar/ 
# End of File
Download terraform.gitignore

List Of Files and Folders That Get Ignored using this Gitignore code

Above Code Helps ignore following files from terraform Project

Local .terraform directories

.tfstate files

Crash log files

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.

Ignore override files as they are usually used to override resources locally and so

are not checked in

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

If you have any questions or suggestions please feel free to contact us


Feedback is the most important part of any website.

If you have any query, suggestion or feedback, Please feel free to contact us.