Repository: chanzuckerberg/fogg
Pull request #401 (2020-02-04 23:29:49)

[feature] pin versions of tls and local providers
This pins the versions of these providers. They are currently hard-coded, but we can configure them when we need to.

### Test Plan
* unit tests

### References
* 


codecov[bot]: # [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/401?src=pr&el=h1) Report
> Merging [#401](https://codecov.io/gh/chanzuckerberg/fogg/pull/401?src=pr&el=desc) into [master](https://codecov.io/gh/chanzuckerberg/fogg/commit/c4c3004397f904195f8d3a275e1e0548ae464d0d?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/chanzuckerberg/fogg/pull/401/graphs/tree.svg?width=650&token=57DhtZ7g2A&height=150&src=pr)](https://codecov.io/gh/chanzuckerberg/fogg/pull/401?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #401   +/-   ##
=======================================
  Coverage   79.22%   79.22%           
=======================================
  Files          25       25           
  Lines        2026     2026           
=======================================
  Hits         1605     1605           
  Misses        278      278           
  Partials      143      143
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/401?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/401?src=pr&el=footer). Last update [c4c3004...6a7f947](https://codecov.io/gh/chanzuckerberg/fogg/pull/401?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/templates/common/common_providers.tmpl b/templates/common/common_providers.tmpl
index 8c8dd4ec..c379d145 100644
--- a/templates/common/common_providers.tmpl
+++ b/templates/common/common_providers.tmpl
@@ -14,4 +14,12 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
 {{- end }}


Test patch:
diff --git a/testdata/bless_provider/terraform/accounts/foo/fogg.tf b/testdata/bless_provider/terraform/accounts/foo/fogg.tf
index abf3f415..c6277e43 100644
--- a/testdata/bless_provider/terraform/accounts/foo/fogg.tf
+++ b/testdata/bless_provider/terraform/accounts/foo/fogg.tf
@@ -108,3 +108,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/bless_provider/terraform/envs/bar/bam/fogg.tf b/testdata/bless_provider/terraform/envs/bar/bam/fogg.tf
index 1793e16b..59aaf4a0 100644
--- a/testdata/bless_provider/terraform/envs/bar/bam/fogg.tf
+++ b/testdata/bless_provider/terraform/envs/bar/bam/fogg.tf
@@ -147,3 +147,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/bless_provider/terraform/global/fogg.tf b/testdata/bless_provider/terraform/global/fogg.tf
index b0864753..87a9a32b 100644
--- a/testdata/bless_provider/terraform/global/fogg.tf
+++ b/testdata/bless_provider/terraform/global/fogg.tf
@@ -109,3 +109,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/github_provider/terraform/accounts/foo/fogg.tf b/testdata/github_provider/terraform/accounts/foo/fogg.tf
index 3d17c512..9bee433e 100644
--- a/testdata/github_provider/terraform/accounts/foo/fogg.tf
+++ b/testdata/github_provider/terraform/accounts/foo/fogg.tf
@@ -92,3 +92,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/github_provider/terraform/envs/bar/bam/fogg.tf b/testdata/github_provider/terraform/envs/bar/bam/fogg.tf
index 6c1c80ce..becdb319 100644
--- a/testdata/github_provider/terraform/envs/bar/bam/fogg.tf
+++ b/testdata/github_provider/terraform/envs/bar/bam/fogg.tf
@@ -131,3 +131,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/github_provider/terraform/global/fogg.tf b/testdata/github_provider/terraform/global/fogg.tf
index 626b73d2..8bf3a201 100644
--- a/testdata/github_provider/terraform/global/fogg.tf
+++ b/testdata/github_provider/terraform/global/fogg.tf
@@ -93,3 +93,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/okta_provider/terraform/accounts/foo/fogg.tf b/testdata/okta_provider/terraform/accounts/foo/fogg.tf
index 75b9888e..9c968341 100644
--- a/testdata/okta_provider/terraform/accounts/foo/fogg.tf
+++ b/testdata/okta_provider/terraform/accounts/foo/fogg.tf
@@ -92,3 +92,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/okta_provider/terraform/envs/bar/bam/fogg.tf b/testdata/okta_provider/terraform/envs/bar/bam/fogg.tf
index 5063322d..636ab68f 100644
--- a/testdata/okta_provider/terraform/envs/bar/bam/fogg.tf
+++ b/testdata/okta_provider/terraform/envs/bar/bam/fogg.tf
@@ -131,3 +131,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/okta_provider/terraform/global/fogg.tf b/testdata/okta_provider/terraform/global/fogg.tf
index 88bf6dbc..dd627747 100644
--- a/testdata/okta_provider/terraform/global/fogg.tf
+++ b/testdata/okta_provider/terraform/global/fogg.tf
@@ -93,3 +93,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/snowflake_provider/terraform/accounts/foo/fogg.tf b/testdata/snowflake_provider/terraform/accounts/foo/fogg.tf
index 749430a3..c4e39896 100644
--- a/testdata/snowflake_provider/terraform/accounts/foo/fogg.tf
+++ b/testdata/snowflake_provider/terraform/accounts/foo/fogg.tf
@@ -93,3 +93,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/snowflake_provider/terraform/envs/bar/bam/fogg.tf b/testdata/snowflake_provider/terraform/envs/bar/bam/fogg.tf
index b0ea4349..837eb4e4 100644
--- a/testdata/snowflake_provider/terraform/envs/bar/bam/fogg.tf
+++ b/testdata/snowflake_provider/terraform/envs/bar/bam/fogg.tf
@@ -132,3 +132,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/snowflake_provider/terraform/global/fogg.tf b/testdata/snowflake_provider/terraform/global/fogg.tf
index e3cda70d..9b4b2152 100644
--- a/testdata/snowflake_provider/terraform/global/fogg.tf
+++ b/testdata/snowflake_provider/terraform/global/fogg.tf
@@ -94,3 +94,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v1_full/terraform/accounts/bar/fogg.tf b/testdata/v1_full/terraform/accounts/bar/fogg.tf
index cf7663e8..0befc04b 100644
--- a/testdata/v1_full/terraform/accounts/bar/fogg.tf
+++ b/testdata/v1_full/terraform/accounts/bar/fogg.tf
@@ -137,3 +137,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v1_full/terraform/accounts/foo/fogg.tf b/testdata/v1_full/terraform/accounts/foo/fogg.tf
index 51535ef5..bf907609 100644
--- a/testdata/v1_full/terraform/accounts/foo/fogg.tf
+++ b/testdata/v1_full/terraform/accounts/foo/fogg.tf
@@ -137,3 +137,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v1_full/terraform/envs/stage/cloud-env/fogg.tf b/testdata/v1_full/terraform/envs/stage/cloud-env/fogg.tf
index 7b794195..00d53188 100644
--- a/testdata/v1_full/terraform/envs/stage/cloud-env/fogg.tf
+++ b/testdata/v1_full/terraform/envs/stage/cloud-env/fogg.tf
@@ -187,3 +187,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v1_full/terraform/envs/stage/helm/fogg.tf b/testdata/v1_full/terraform/envs/stage/helm/fogg.tf
index a368a3ee..7aecf340 100644
--- a/testdata/v1_full/terraform/envs/stage/helm/fogg.tf
+++ b/testdata/v1_full/terraform/envs/stage/helm/fogg.tf
@@ -187,3 +187,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v1_full/terraform/global/fogg.tf b/testdata/v1_full/terraform/global/fogg.tf
index 5812ff83..0da034c2 100644
--- a/testdata/v1_full/terraform/global/fogg.tf
+++ b/testdata/v1_full/terraform/global/fogg.tf
@@ -118,3 +118,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_full/terraform/accounts/bar/fogg.tf b/testdata/v2_full/terraform/accounts/bar/fogg.tf
index 0550f28e..e62214d3 100644
--- a/testdata/v2_full/terraform/accounts/bar/fogg.tf
+++ b/testdata/v2_full/terraform/accounts/bar/fogg.tf
@@ -129,3 +129,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_full/terraform/accounts/foo/fogg.tf b/testdata/v2_full/terraform/accounts/foo/fogg.tf
index 5acd4103..8018743f 100644
--- a/testdata/v2_full/terraform/accounts/foo/fogg.tf
+++ b/testdata/v2_full/terraform/accounts/foo/fogg.tf
@@ -129,3 +129,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_full/terraform/envs/staging/comp1/fogg.tf b/testdata/v2_full/terraform/envs/staging/comp1/fogg.tf
index f7b51f4b..4146c625 100644
--- a/testdata/v2_full/terraform/envs/staging/comp1/fogg.tf
+++ b/testdata/v2_full/terraform/envs/staging/comp1/fogg.tf
@@ -191,3 +191,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_full/terraform/envs/staging/comp2/fogg.tf b/testdata/v2_full/terraform/envs/staging/comp2/fogg.tf
index 80852bd7..debd825c 100644
--- a/testdata/v2_full/terraform/envs/staging/comp2/fogg.tf
+++ b/testdata/v2_full/terraform/envs/staging/comp2/fogg.tf
@@ -191,3 +191,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_full/terraform/envs/staging/vpc/fogg.tf b/testdata/v2_full/terraform/envs/staging/vpc/fogg.tf
index a0e6383f..c3011232 100644
--- a/testdata/v2_full/terraform/envs/staging/vpc/fogg.tf
+++ b/testdata/v2_full/terraform/envs/staging/vpc/fogg.tf
@@ -191,3 +191,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_full/terraform/global/fogg.tf b/testdata/v2_full/terraform/global/fogg.tf
index 8b36e04d..90eb1ded 100644
--- a/testdata/v2_full/terraform/global/fogg.tf
+++ b/testdata/v2_full/terraform/global/fogg.tf
@@ -110,3 +110,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_minimal_valid/terraform/global/fogg.tf b/testdata/v2_minimal_valid/terraform/global/fogg.tf
index 5d276d27..9ff531ea 100644
--- a/testdata/v2_minimal_valid/terraform/global/fogg.tf
+++ b/testdata/v2_minimal_valid/terraform/global/fogg.tf
@@ -84,3 +84,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_no_aws_provider/terraform/accounts/bar/fogg.tf b/testdata/v2_no_aws_provider/terraform/accounts/bar/fogg.tf
index 29ac8811..17146554 100644
--- a/testdata/v2_no_aws_provider/terraform/accounts/bar/fogg.tf
+++ b/testdata/v2_no_aws_provider/terraform/accounts/bar/fogg.tf
@@ -104,3 +104,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_no_aws_provider/terraform/accounts/foo/fogg.tf b/testdata/v2_no_aws_provider/terraform/accounts/foo/fogg.tf
index 1b8e5f88..4da2dbe2 100644
--- a/testdata/v2_no_aws_provider/terraform/accounts/foo/fogg.tf
+++ b/testdata/v2_no_aws_provider/terraform/accounts/foo/fogg.tf
@@ -104,3 +104,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_no_aws_provider/terraform/envs/staging/comp1/fogg.tf b/testdata/v2_no_aws_provider/terraform/envs/staging/comp1/fogg.tf
index 9b6c06ba..16859cd1 100644
--- a/testdata/v2_no_aws_provider/terraform/envs/staging/comp1/fogg.tf
+++ b/testdata/v2_no_aws_provider/terraform/envs/staging/comp1/fogg.tf
@@ -165,3 +165,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_no_aws_provider/terraform/envs/staging/comp2/fogg.tf b/testdata/v2_no_aws_provider/terraform/envs/staging/comp2/fogg.tf
index 0d74228a..9b1ade53 100644
--- a/testdata/v2_no_aws_provider/terraform/envs/staging/comp2/fogg.tf
+++ b/testdata/v2_no_aws_provider/terraform/envs/staging/comp2/fogg.tf
@@ -165,3 +165,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_no_aws_provider/terraform/envs/staging/vpc/fogg.tf b/testdata/v2_no_aws_provider/terraform/envs/staging/vpc/fogg.tf
index 40bebeee..c57b38b0 100644
--- a/testdata/v2_no_aws_provider/terraform/envs/staging/vpc/fogg.tf
+++ b/testdata/v2_no_aws_provider/terraform/envs/staging/vpc/fogg.tf
@@ -165,3 +165,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}
diff --git a/testdata/v2_no_aws_provider/terraform/global/fogg.tf b/testdata/v2_no_aws_provider/terraform/global/fogg.tf
index 0474fed5..16d0bb30 100644
--- a/testdata/v2_no_aws_provider/terraform/global/fogg.tf
+++ b/testdata/v2_no_aws_provider/terraform/global/fogg.tf
@@ -89,3 +89,11 @@ provider archive {
 provider null {
   version = "~> 2.1"
 }
+
+provider local {
+  version = "~> 1.4"
+}
+
+provider tls {
+  version = "~> 2.1"
+}