Repository: chanzuckerberg/fogg
Pull request #657 (2022-06-02 22:02:05)

chore: Have Git ignore .terraform.lock.hcl
### Summary
`.terraform.lock.hcl` files are created locally whenever a user needs to manage TFE state. These should not be pushed so the state isn't locked inadvertently.

### Test Plan
```
make update-golden-files
make test
```

### References
[ONCALL-60]


[ONCALL-60]: https://czi-eng.atlassian.net/browse/ONCALL-60?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ


Patch:
diff --git a/templates/templates/repo/.gitignore b/templates/templates/repo/.gitignore
index 16291b8b..99b345e3 100644
--- a/templates/templates/repo/.gitignore
+++ b/templates/templates/repo/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/


Test patch:
diff --git a/testdata/auth0_provider_yaml/.gitignore b/testdata/auth0_provider_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/auth0_provider_yaml/.gitignore
+++ b/testdata/auth0_provider_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/bless_provider_yaml/.gitignore b/testdata/bless_provider_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/bless_provider_yaml/.gitignore
+++ b/testdata/bless_provider_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/circleci/.gitignore b/testdata/circleci/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/circleci/.gitignore
+++ b/testdata/circleci/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/github_actions/.gitignore b/testdata/github_actions/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/github_actions/.gitignore
+++ b/testdata/github_actions/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/github_provider_yaml/.gitignore b/testdata/github_provider_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/github_provider_yaml/.gitignore
+++ b/testdata/github_provider_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/okta_provider_yaml/.gitignore b/testdata/okta_provider_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/okta_provider_yaml/.gitignore
+++ b/testdata/okta_provider_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/remote_backend_yaml/.gitignore b/testdata/remote_backend_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/remote_backend_yaml/.gitignore
+++ b/testdata/remote_backend_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/snowflake_provider_yaml/.gitignore b/testdata/snowflake_provider_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/snowflake_provider_yaml/.gitignore
+++ b/testdata/snowflake_provider_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/tfe_provider_yaml/.gitignore b/testdata/tfe_provider_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/tfe_provider_yaml/.gitignore
+++ b/testdata/tfe_provider_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/v2_full_yaml/.gitignore b/testdata/v2_full_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/v2_full_yaml/.gitignore
+++ b/testdata/v2_full_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/v2_minimal_valid_yaml/.gitignore b/testdata/v2_minimal_valid_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/v2_minimal_valid_yaml/.gitignore
+++ b/testdata/v2_minimal_valid_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/
diff --git a/testdata/v2_no_aws_provider_yaml/.gitignore b/testdata/v2_no_aws_provider_yaml/.gitignore
index 16291b8b..99b345e3 100644
--- a/testdata/v2_no_aws_provider_yaml/.gitignore
+++ b/testdata/v2_no_aws_provider_yaml/.gitignore
@@ -6,6 +6,7 @@
 *.tfstate.*.backup
 *.tfstate.backup
 *tfvars
+.terraform.lock.hcl
 
 # Module directory
 .terraform/