# .gitignore for 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 *.tfvars *.tfvars.json !example.tfvars # Ignore override files, as they are usually used to override resources locally override.tf override.tf.json *_override.tf *_override.tf.json # Include override files you do want to commit !example_override.tf # Ignore CLI configuration files .terraformrc terraform.rc # Ignore plan files *.tfplan plan.out # Ignore lock files (optional - many teams commit this) # .terraform.lock.hcl # Ignore Mac .DS_Store files .DS_Store # Ignore Linux/Unix hidden files .vscode/ .idea/ *.swp *.swo *~ # Ignore Windows files Thumbs.db *.exe # Ignore temporary files *.tmp *.temp # Ignore local variable override files local.tfvars # Ignore environment-specific files *.local .env .env.local # Ignore Terraform debug files debug.tflog debug.tflog.* # Ignore custom scripts or local testing files scripts/local/ local_tests/ # Ignore secrets and credentials secrets.tfvars .ssh/ *.pem *.pub # OS-specific .DS_Store .AppleDouble .LSOverride *.VC.db