Skip to content

Instantly share code, notes, and snippets.

@Maurifc
Last active October 31, 2022 12:16
Show Gist options
  • Save Maurifc/fe49a103e742a96d984a14821f15e0af to your computer and use it in GitHub Desktop.
Save Maurifc/fe49a103e742a96d984a14821f15e0af to your computer and use it in GitHub Desktop.
Terraform - Git ignore file for Terraform projects
# Local .terraform directories
**/.terraform/*
# .tfstate files
*.tfstate
*.tfstate.*
.infracost
# Crash log files
crash.log
# Exclude all .tfvars files, which are likely to contain sentitive 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
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment