Repository: chanzuckerberg/fogg
Pull request #672 (2022-07-04 15:09:41)

chore: Bump github.com/stretchr/testify from 1.7.1 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.8.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/stretchr/testify/commit/181cea6eab8b2de7071383eca4be32a424db38dd"><code>181cea6</code></a> impr: <code>CallerInfo</code> should print full paths to the terminal (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1201">#1201</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/cf1284f8dd6f0bf34eed4ab8808ef88f40f7d00f"><code>cf1284f</code></a> Allow mock expectations to be ordered (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1106">#1106</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/66eef0ef3adb4691cdc275620c9a129f2f98935a"><code>66eef0e</code></a> fix: assert.MapSubset (or just support maps in assert.Subset) (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1178">#1178</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/2fab6dffcf101c5a79fc8f3cd67a3541432db5fd"><code>2fab6df</code></a> Add WithinTimeRange method (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1188">#1188</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/b5ce16571001d6e96e1693ac891fed5c2510c651"><code>b5ce165</code></a> fixing panic in calls to assertion with nil m.mutex (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1212">#1212</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/c206b2e823e70c1e4e7ca8eded9e410acc8f71be"><code>c206b2e</code></a> Mock can be deadlocked by a panic (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1157">#1157</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/1b73601ae8d1c3e389e93092f595b1f6e3d68251"><code>1b73601</code></a> suite: correctly set stats on test panic (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1195">#1195</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/ba1076d8b3b67cdaf7bf92c95b3641636a039be2"><code>ba1076d</code></a> Add .Unset method to mock (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/982">#982</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/c31ea0312f8a96ca55801db5ebdf62119800fb70"><code>c31ea03</code></a> Support comparing byte slice (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1202">#1202</a>)</li>
<li><a href="https://github.com/stretchr/testify/commit/48391ba5eb8c5f49132138e67ec112d180b88f63"><code>48391ba</code></a> Fix panic in AssertExpectations for mocks without expectations (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1207">#1207</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/stretchr/testify/compare/v1.7.1...v1.8.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.7.1&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/go.mod b/go.mod
index 32bb47df..d2b60bbb 100644
--- a/go.mod
+++ b/go.mod
@@ -31,10 +31,10 @@ require (
 	github.com/sirupsen/logrus v1.8.1
 	github.com/spf13/afero v1.2.2
 	github.com/spf13/cobra v1.5.0
-	github.com/stretchr/testify v1.7.1
+	github.com/stretchr/testify v1.8.0
 	gopkg.in/go-playground/validator.v9 v9.31.0
 	gopkg.in/ini.v1 v1.66.6
-	gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
+	gopkg.in/yaml.v3 v3.0.1
 )
 
 require (
diff --git a/go.sum b/go.sum
index f31745f3..1f231d3f 100644
--- a/go.sum
+++ b/go.sum
@@ -740,6 +740,7 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
@@ -748,8 +749,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw=
 github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
 github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk=
@@ -1216,8 +1218,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
 gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=


Test patch:
diff --git a/testdata/v2_no_aws_provider_yaml/Makefile b/testdata/v2_no_aws_provider_yaml/Makefile
index a74f2023..efdb7b35 100644
--- a/testdata/v2_no_aws_provider_yaml/Makefile
+++ b/testdata/v2_no_aws_provider_yaml/Makefile
@@ -3,9 +3,9 @@
 
 include scripts/common.mk
 
-ENVS=staging
-MODULES=
-ACCOUNTS=
+ENVS=prod staging
+MODULES=my_module
+ACCOUNTS=bar foo
 
 all: check
 
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/Makefile
new file mode 100644
index 00000000..d30df536
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/Makefile
@@ -0,0 +1,20 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+
+
+export TERRAFORM_VERSION := 0.100.0
+export TFLINT_ENABLED := 0
+export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
+export TF_BACKEND_KIND := s3
+
+export AWS_BACKEND_PROFILE := profile
+
+
+
+include ../../..//scripts/component.mk
+
+
+help: ## display help for this makefile
+	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+.PHONY: help
+
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/README.md b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/fogg.tf
new file mode 100644
index 00000000..0ec6c7ad
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/fogg.tf
@@ -0,0 +1,158 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+terraform {
+  required_version = "=0.100.0"
+
+  backend "s3" {
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/bar.tfstate"
+    encrypt = true
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+  required_providers {
+
+    archive = {
+      source = "hashicorp/archive"
+
+      version = "~> 2.0"
+
+    }
+
+    assert = {
+      source = "bwoznicki/assert"
+
+      version = "~> 0.0.1"
+
+    }
+
+    local = {
+      source = "hashicorp/local"
+
+      version = "~> 2.0"
+
+    }
+
+    null = {
+      source = "hashicorp/null"
+
+      version = "~> 3.0"
+
+    }
+
+    okta-head = {
+      source = "okta/okta"
+
+      version = "~> 3.30"
+
+    }
+
+    random = {
+      source = "hashicorp/random"
+
+      version = "~> 2.2"
+
+    }
+
+    template = {
+      source = "hashicorp/template"
+
+      version = "~> 2.2"
+
+    }
+
+    tls = {
+      source = "hashicorp/tls"
+
+      version = "~> 3.0"
+
+    }
+
+  }
+}
+variable "env" {
+  type    = string
+  default = "accounts"
+}
+variable "project" {
+  type    = string
+  default = "proj"
+}
+variable "component" {
+  type    = string
+  default = "bar"
+}
+variable "account" {
+  type    = string
+  default = "bar"
+}
+variable "owner" {
+  type    = string
+  default = "foo@example.com"
+}
+variable "tags" {
+  type = object({ project : string, env : string, service : string, owner : string, managedBy : string })
+  default = {
+    project   = "proj"
+    env       = "accounts"
+    service   = "bar"
+    owner     = "foo@example.com"
+    managedBy = "terraform"
+  }
+}
+variable "foo" {
+  type    = string
+  default = "bar1"
+}
+data "terraform_remote_state" "global" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/global.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "bar" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/bar.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "foo" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/foo.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+variable "aws_accounts" {
+  type = map(string)
+  default = {
+
+  }
+}
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/main.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/outputs.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terraform.d
new file mode 120000
index 00000000..29617d28
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terraform.d
@@ -0,0 +1,1 @@
+../../../terraform.d
\ No newline at end of file
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/variables.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/Makefile
new file mode 100644
index 00000000..d30df536
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/Makefile
@@ -0,0 +1,20 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+
+
+export TERRAFORM_VERSION := 0.100.0
+export TFLINT_ENABLED := 0
+export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
+export TF_BACKEND_KIND := s3
+
+export AWS_BACKEND_PROFILE := profile
+
+
+
+include ../../..//scripts/component.mk
+
+
+help: ## display help for this makefile
+	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+.PHONY: help
+
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/README.md b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/fogg.tf
new file mode 100644
index 00000000..60489edd
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/fogg.tf
@@ -0,0 +1,158 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+terraform {
+  required_version = "=0.100.0"
+
+  backend "s3" {
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/foo.tfstate"
+    encrypt = true
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+  required_providers {
+
+    archive = {
+      source = "hashicorp/archive"
+
+      version = "~> 2.0"
+
+    }
+
+    assert = {
+      source = "bwoznicki/assert"
+
+      version = "~> 0.0.1"
+
+    }
+
+    local = {
+      source = "hashicorp/local"
+
+      version = "~> 2.0"
+
+    }
+
+    null = {
+      source = "hashicorp/null"
+
+      version = "~> 3.0"
+
+    }
+
+    okta-head = {
+      source = "okta/okta"
+
+      version = "~> 3.30"
+
+    }
+
+    random = {
+      source = "hashicorp/random"
+
+      version = "~> 2.2"
+
+    }
+
+    template = {
+      source = "hashicorp/template"
+
+      version = "~> 2.2"
+
+    }
+
+    tls = {
+      source = "hashicorp/tls"
+
+      version = "~> 3.0"
+
+    }
+
+  }
+}
+variable "env" {
+  type    = string
+  default = "accounts"
+}
+variable "project" {
+  type    = string
+  default = "proj"
+}
+variable "component" {
+  type    = string
+  default = "foo"
+}
+variable "account" {
+  type    = string
+  default = "foo"
+}
+variable "owner" {
+  type    = string
+  default = "foo@example.com"
+}
+variable "tags" {
+  type = object({ project : string, env : string, service : string, owner : string, managedBy : string })
+  default = {
+    project   = "proj"
+    env       = "accounts"
+    service   = "foo"
+    owner     = "foo@example.com"
+    managedBy = "terraform"
+  }
+}
+variable "foo" {
+  type    = string
+  default = "bar1"
+}
+data "terraform_remote_state" "global" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/global.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "bar" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/bar.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "foo" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/foo.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+variable "aws_accounts" {
+  type = map(string)
+  default = {
+
+  }
+}
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/main.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/outputs.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terraform.d
new file mode 120000
index 00000000..29617d28
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terraform.d
@@ -0,0 +1,1 @@
+../../../terraform.d
\ No newline at end of file
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/variables.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/Makefile
new file mode 100644
index 00000000..341a07dc
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/Makefile
@@ -0,0 +1,51 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+
+COMPONENTS=
+
+all:
+.PHONY: all
+
+lint: ## lint all components in the env
+	@for c in $(COMPONENTS); do \
+		echo $$c; \
+		$(MAKE) -C $$c lint || exit $$? ; \
+	done
+.PHONY: lint
+
+fmt: ## format terraform code in all components in this env
+	@for c in $(COMPONENTS); do \
+		echo $$c; \
+		$(MAKE) -C $$c fmt || exit $$? ; \
+	done
+.PHONY: fmt
+
+check-plan: ## check all plans in this environment
+	@for c in $(COMPONENTS); do \
+		echo $$c; \
+		$(MAKE) -C $$c check-plan || exit $$? ; \
+	done
+.PHONY: check-plan
+
+docs: ## generate docs for all components in this env
+	@for c in $(COMPONENTS); do \
+		echo $$c; \
+		$(MAKE) -C $$c docs || exit $$? ; \
+	done
+.PHONY: docs
+
+clean: ## clean all components in this env
+	@for c in $(COMPONENTS); do \
+		echo $$c; \
+		$(MAKE) -C $$c clean || exit $$? ; \
+	done
+.PHONY: clean
+
+test:
+.PHONY: test
+
+
+help: ## display help for this makefile
+	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+.PHONY: help
+
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/README.md b/testdata/v2_no_aws_provider_yaml/terraform/envs/prod/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile
index 0e0e5b9a..9fb1403e 100644
--- a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/Makefile
@@ -1,7 +1,7 @@
 # Auto-generated by fogg. Do not edit
 # Make improvements in fogg, so that everyone can benefit.
 
-COMPONENTS=vpc
+COMPONENTS=comp1 comp2 vpc
 
 all:
 .PHONY: all
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/Makefile
new file mode 100644
index 00000000..ae0dfece
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/Makefile
@@ -0,0 +1,20 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+
+
+export TERRAFORM_VERSION := 0.100.0
+export TFLINT_ENABLED := 0
+export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache
+export TF_BACKEND_KIND := s3
+
+export AWS_BACKEND_PROFILE := profile
+
+
+
+include ../../../..//scripts/component.mk
+
+
+help: ## display help for this makefile
+	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+.PHONY: help
+
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/README.md b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/fogg.tf
new file mode 100644
index 00000000..e7755b7d
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/fogg.tf
@@ -0,0 +1,182 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+terraform {
+  required_version = "=0.100.0"
+
+  backend "s3" {
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/comp1.tfstate"
+    encrypt = true
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+  required_providers {
+
+    archive = {
+      source = "hashicorp/archive"
+
+      version = "~> 2.0"
+
+    }
+
+    assert = {
+      source = "bwoznicki/assert"
+
+      version = "~> 0.0.1"
+
+    }
+
+    local = {
+      source = "hashicorp/local"
+
+      version = "~> 2.0"
+
+    }
+
+    null = {
+      source = "hashicorp/null"
+
+      version = "~> 3.0"
+
+    }
+
+    okta-head = {
+      source = "okta/okta"
+
+      version = "~> 3.30"
+
+    }
+
+    random = {
+      source = "hashicorp/random"
+
+      version = "~> 2.2"
+
+    }
+
+    template = {
+      source = "hashicorp/template"
+
+      version = "~> 2.2"
+
+    }
+
+    tls = {
+      source = "hashicorp/tls"
+
+      version = "~> 3.0"
+
+    }
+
+  }
+}
+variable "env" {
+  type    = string
+  default = "staging"
+}
+variable "project" {
+  type    = string
+  default = "proj"
+}
+variable "component" {
+  type    = string
+  default = "comp1"
+}
+variable "owner" {
+  type    = string
+  default = "foo@example.com"
+}
+variable "tags" {
+  type = object({ project : string, env : string, service : string, owner : string, managedBy : string })
+  default = {
+    project   = "proj"
+    env       = "staging"
+    service   = "comp1"
+    owner     = "foo@example.com"
+    managedBy = "terraform"
+  }
+}
+variable "foo" {
+  type    = string
+  default = "bar2"
+}
+data "terraform_remote_state" "global" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/global.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "comp2" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/comp2.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "vpc" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/vpc.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "bar" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/bar.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "foo" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/foo.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+variable "aws_accounts" {
+  type = map(string)
+  default = {
+
+  }
+}
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/main.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/outputs.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terraform.d
new file mode 120000
index 00000000..b482d75b
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terraform.d
@@ -0,0 +1,1 @@
+../../../../terraform.d
\ No newline at end of file
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/variables.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/Makefile
new file mode 100644
index 00000000..ae0dfece
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/Makefile
@@ -0,0 +1,20 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+
+
+export TERRAFORM_VERSION := 0.100.0
+export TFLINT_ENABLED := 0
+export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache
+export TF_BACKEND_KIND := s3
+
+export AWS_BACKEND_PROFILE := profile
+
+
+
+include ../../../..//scripts/component.mk
+
+
+help: ## display help for this makefile
+	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+.PHONY: help
+
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/README.md b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/README.md
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/fogg.tf
new file mode 100644
index 00000000..f1d8e28c
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/fogg.tf
@@ -0,0 +1,182 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+terraform {
+  required_version = "=0.100.0"
+
+  backend "s3" {
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/comp2.tfstate"
+    encrypt = true
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+  required_providers {
+
+    archive = {
+      source = "hashicorp/archive"
+
+      version = "~> 2.0"
+
+    }
+
+    assert = {
+      source = "bwoznicki/assert"
+
+      version = "~> 0.0.1"
+
+    }
+
+    local = {
+      source = "hashicorp/local"
+
+      version = "~> 2.0"
+
+    }
+
+    null = {
+      source = "hashicorp/null"
+
+      version = "~> 3.0"
+
+    }
+
+    okta-head = {
+      source = "okta/okta"
+
+      version = "~> 3.30"
+
+    }
+
+    random = {
+      source = "hashicorp/random"
+
+      version = "~> 2.2"
+
+    }
+
+    template = {
+      source = "hashicorp/template"
+
+      version = "~> 2.2"
+
+    }
+
+    tls = {
+      source = "hashicorp/tls"
+
+      version = "~> 3.0"
+
+    }
+
+  }
+}
+variable "env" {
+  type    = string
+  default = "staging"
+}
+variable "project" {
+  type    = string
+  default = "proj"
+}
+variable "component" {
+  type    = string
+  default = "comp2"
+}
+variable "owner" {
+  type    = string
+  default = "foo@example.com"
+}
+variable "tags" {
+  type = object({ project : string, env : string, service : string, owner : string, managedBy : string })
+  default = {
+    project   = "proj"
+    env       = "staging"
+    service   = "comp2"
+    owner     = "foo@example.com"
+    managedBy = "terraform"
+  }
+}
+variable "foo" {
+  type    = string
+  default = "bar2"
+}
+data "terraform_remote_state" "global" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/global.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "comp1" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/comp1.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "vpc" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/vpc.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "bar" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/bar.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "foo" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/foo.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+variable "aws_accounts" {
+  type = map(string)
+  default = {
+
+  }
+}
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/main.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/main.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/outputs.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/outputs.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terraform.d b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terraform.d
new file mode 120000
index 00000000..b482d75b
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terraform.d
@@ -0,0 +1,1 @@
+../../../../terraform.d
\ No newline at end of file
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/variables.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/variables.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf
index 470a96b1..689031fc 100644
--- a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/fogg.tf
@@ -116,6 +116,62 @@ data "terraform_remote_state" "global" {
     profile = "profile"
 
 
+  }
+}
+data "terraform_remote_state" "comp1" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/comp1.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "comp2" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/envs/staging/components/comp2.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "bar" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/bar.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
+  }
+}
+data "terraform_remote_state" "foo" {
+  backend = "s3"
+  config = {
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/foo.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
   }
 }
 variable "aws_accounts" {
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/Makefile
new file mode 100644
index 00000000..08271062
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/Makefile
@@ -0,0 +1,12 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.
+
+export TERRAFORM_VERSION := 0.100.0
+export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
+
+include ../../..//scripts/module.mk
+
+
+help: ## display help for this makefile
+	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+.PHONY: help
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/README.md b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/README.md
new file mode 100644
index 00000000..fce2ac06
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/README.md
@@ -0,0 +1,2 @@
+<!-- START -->
+<!-- END -->
\ No newline at end of file
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/fogg.tf b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/fogg.tf
new file mode 100644
index 00000000..8c7ad42a
--- /dev/null
+++ b/testdata/v2_no_aws_provider_yaml/terraform/modules/my_module/fogg.tf
@@ -0,0 +1,2 @@
+# Auto-generated by fogg. Do not edit
+# Make improvements in fogg, so that everyone can benefit.