From 18bdb8848434d872279292c7e90e99fe192169bb Mon Sep 17 00:00:00 2001 From: Josh Kodroff Date: Wed, 4 Apr 2018 13:59:50 -0400 Subject: [PATCH 1/2] Remove tfvars files from Terraform.gitignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `tfvars` files should not be gitignore-d as they are used to parameterize a Terraform root for multiple environments, e.g.: ```bash $ tree terraform/roots/vpc terraform/roots/vpc ├── env │   ├── production.tfvars │   ├── qa.tfvars │   └── staging.tfvars └── main.tf ``` There may be a use case where a particular `tfvars` file should be ignored, but there's no naming convention I'm aware of to easily designate such a file. --- Terraform.gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/Terraform.gitignore b/Terraform.gitignore index 1fef4ab9..428217ad 100644 --- a/Terraform.gitignore +++ b/Terraform.gitignore @@ -4,6 +4,3 @@ # .tfstate files *.tfstate *.tfstate.* - -# .tfvars files -*.tfvars From da1a8284717a93b6cdeeb35a0ac5831ff7c2071e Mon Sep 17 00:00:00 2001 From: Josh Kodroff Date: Sun, 13 May 2018 17:55:40 -0400 Subject: [PATCH 2/2] Update Terraform.gitignore --- Terraform.gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Terraform.gitignore b/Terraform.gitignore index 428217ad..29c51746 100644 --- a/Terraform.gitignore +++ b/Terraform.gitignore @@ -4,3 +4,9 @@ # .tfstate files *.tfstate *.tfstate.* + +# Ignore any .tfvars files that are generated automatically for each Terraform run. Most +# .tfvars files are managed as part of configuration and so should be included in +# version control. +# +# example.tfvars