Repository: chanzuckerberg/fogg
Pull request #398 (2020-02-03 17:52:46)

[fix] triggering heroku auth checks
When intially built in b93a1d6d3f5b6a2395015b7fe2de4126415f1481, I
missed setting `HEROKU_PROVIDER` in accounts and global, which meant
that the heroku auth checks did not get run.

### Test Plan
* travis-ci tests

### References
* 


codecov[bot]: # [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/398?src=pr&el=h1) Report
> Merging [#398](https://codecov.io/gh/chanzuckerberg/fogg/pull/398?src=pr&el=desc) into [master](https://codecov.io/gh/chanzuckerberg/fogg/commit/bd418ce938adb56a6a3daf0c1b8b51128b177264?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/398/graphs/tree.svg?width=650&token=57DhtZ7g2A&height=150&src=pr)](https://codecov.io/gh/chanzuckerberg/fogg/pull/398?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #398   +/-   ##
=======================================
  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/398?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/398?src=pr&el=footer). Last update [bd418ce...559028e](https://codecov.io/gh/chanzuckerberg/fogg/pull/398?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/templates/account/Makefile.tmpl b/templates/account/Makefile.tmpl
index 3d8ffd47..5e5004aa 100644
--- a/templates/account/Makefile.tmpl
+++ b/templates/account/Makefile.tmpl
@@ -9,7 +9,11 @@ export AWS_BACKEND_PROFILE := {{ .Backend.Profile }}
 {{if .Providers.AWS}}
 export AWS_PROVIDER_PROFILE := {{ .Providers.AWS.Profile }}
 {{ end }}
+{{if .Providers.Heroku}}
+export HEROKU_PROVIDER := 1
+{{end}}
+
 
 include {{ .PathToRepoRoot }}/scripts/component.mk
 
-{{ template "make_help"  }}
\ No newline at end of file
+{{ template "make_help"  }}
diff --git a/templates/global/Makefile.tmpl b/templates/global/Makefile.tmpl
index fd202e7e..5e5004aa 100644
--- a/templates/global/Makefile.tmpl
+++ b/templates/global/Makefile.tmpl
@@ -4,7 +4,16 @@
 export TERRAFORM_VERSION := {{ .TerraformVersion }}
 export TFLINT_ENABLED := {{ if .TfLint.Enabled }}1{{ else }}0{{ end }}
 export TF_PLUGIN_CACHE_DIR := {{ .PathToRepoRoot }}/.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := {{ if .Atlantis.Enabled }}1{{ else }}0{{ end }}
+export AWS_BACKEND_PROFILE := {{ .Backend.Profile }}
+{{if .Providers.AWS}}
+export AWS_PROVIDER_PROFILE := {{ .Providers.AWS.Profile }}
+{{ end }}
+{{if .Providers.Heroku}}
+export HEROKU_PROVIDER := 1
+{{end}}
+
 
 include {{ .PathToRepoRoot }}/scripts/component.mk
 
-{{ template "make_help"  }}
\ No newline at end of file
+{{ template "make_help"  }}


Test patch:
diff --git a/testdata/bless_provider/terraform/accounts/foo/Makefile b/testdata/bless_provider/terraform/accounts/foo/Makefile
index 260c7826..a71eb875 100644
--- a/testdata/bless_provider/terraform/accounts/foo/Makefile
+++ b/testdata/bless_provider/terraform/accounts/foo/Makefile
@@ -8,9 +8,12 @@ export ATLANTIS_ENABLED := 0
 export AWS_BACKEND_PROFILE := foofoo
 
 
+
+
 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/bless_provider/terraform/global/Makefile b/testdata/bless_provider/terraform/global/Makefile
index 2c687122..3ca4cc81 100644
--- a/testdata/bless_provider/terraform/global/Makefile
+++ b/testdata/bless_provider/terraform/global/Makefile
@@ -4,6 +4,11 @@
 export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 0
+export AWS_BACKEND_PROFILE := foofoo
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +16,4 @@ 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/github_provider/terraform/accounts/foo/Makefile b/testdata/github_provider/terraform/accounts/foo/Makefile
index 6c2d1b10..88412450 100644
--- a/testdata/github_provider/terraform/accounts/foo/Makefile
+++ b/testdata/github_provider/terraform/accounts/foo/Makefile
@@ -8,9 +8,12 @@ export ATLANTIS_ENABLED := 0
 export AWS_BACKEND_PROFILE := foo
 
 
+
+
 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/github_provider/terraform/global/Makefile b/testdata/github_provider/terraform/global/Makefile
index 2c687122..b81c4ac3 100644
--- a/testdata/github_provider/terraform/global/Makefile
+++ b/testdata/github_provider/terraform/global/Makefile
@@ -4,6 +4,11 @@
 export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 0
+export AWS_BACKEND_PROFILE := foo
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +16,4 @@ 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/okta_provider/terraform/accounts/foo/Makefile b/testdata/okta_provider/terraform/accounts/foo/Makefile
index 260c7826..a71eb875 100644
--- a/testdata/okta_provider/terraform/accounts/foo/Makefile
+++ b/testdata/okta_provider/terraform/accounts/foo/Makefile
@@ -8,9 +8,12 @@ export ATLANTIS_ENABLED := 0
 export AWS_BACKEND_PROFILE := foofoo
 
 
+
+
 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/okta_provider/terraform/global/Makefile b/testdata/okta_provider/terraform/global/Makefile
index 2c687122..3ca4cc81 100644
--- a/testdata/okta_provider/terraform/global/Makefile
+++ b/testdata/okta_provider/terraform/global/Makefile
@@ -4,6 +4,11 @@
 export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 0
+export AWS_BACKEND_PROFILE := foofoo
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +16,4 @@ 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/snowflake_provider/terraform/accounts/foo/Makefile b/testdata/snowflake_provider/terraform/accounts/foo/Makefile
index 6c2d1b10..88412450 100644
--- a/testdata/snowflake_provider/terraform/accounts/foo/Makefile
+++ b/testdata/snowflake_provider/terraform/accounts/foo/Makefile
@@ -8,9 +8,12 @@ export ATLANTIS_ENABLED := 0
 export AWS_BACKEND_PROFILE := foo
 
 
+
+
 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/snowflake_provider/terraform/global/Makefile b/testdata/snowflake_provider/terraform/global/Makefile
index 2c687122..b81c4ac3 100644
--- a/testdata/snowflake_provider/terraform/global/Makefile
+++ b/testdata/snowflake_provider/terraform/global/Makefile
@@ -4,6 +4,11 @@
 export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 0
+export AWS_BACKEND_PROFILE := foo
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +16,4 @@ 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/v1_full/terraform/accounts/bar/Makefile b/testdata/v1_full/terraform/accounts/bar/Makefile
index 4ed9a625..7a0e614f 100644
--- a/testdata/v1_full/terraform/accounts/bar/Makefile
+++ b/testdata/v1_full/terraform/accounts/bar/Makefile
@@ -10,9 +10,12 @@ export AWS_BACKEND_PROFILE := czi-bar
 export AWS_PROVIDER_PROFILE := czi-bar
 
 
+
+
 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/v1_full/terraform/accounts/foo/Makefile b/testdata/v1_full/terraform/accounts/foo/Makefile
index 49aec022..b8dc9966 100644
--- a/testdata/v1_full/terraform/accounts/foo/Makefile
+++ b/testdata/v1_full/terraform/accounts/foo/Makefile
@@ -10,9 +10,12 @@ export AWS_BACKEND_PROFILE := czi-foo
 export AWS_PROVIDER_PROFILE := czi-foo
 
 
+
+
 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/v1_full/terraform/global/Makefile b/testdata/v1_full/terraform/global/Makefile
index cf2bbc23..c02c48fd 100644
--- a/testdata/v1_full/terraform/global/Makefile
+++ b/testdata/v1_full/terraform/global/Makefile
@@ -4,6 +4,13 @@
 export TERRAFORM_VERSION := 0.11.0
 export TFLINT_ENABLED := 1
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 0
+export AWS_BACKEND_PROFILE := czi
+
+export AWS_PROVIDER_PROFILE := czi
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +18,4 @@ 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_full/terraform/accounts/bar/Makefile b/testdata/v2_full/terraform/accounts/bar/Makefile
index 60c7f3ef..c327324d 100644
--- a/testdata/v2_full/terraform/accounts/bar/Makefile
+++ b/testdata/v2_full/terraform/accounts/bar/Makefile
@@ -10,9 +10,12 @@ export AWS_BACKEND_PROFILE := profile
 export AWS_PROVIDER_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_full/terraform/accounts/foo/Makefile b/testdata/v2_full/terraform/accounts/foo/Makefile
index 60c7f3ef..c327324d 100644
--- a/testdata/v2_full/terraform/accounts/foo/Makefile
+++ b/testdata/v2_full/terraform/accounts/foo/Makefile
@@ -10,9 +10,12 @@ export AWS_BACKEND_PROFILE := profile
 export AWS_PROVIDER_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_full/terraform/global/Makefile b/testdata/v2_full/terraform/global/Makefile
index 9f32bdea..5879a826 100644
--- a/testdata/v2_full/terraform/global/Makefile
+++ b/testdata/v2_full/terraform/global/Makefile
@@ -4,6 +4,13 @@
 export TERRAFORM_VERSION := 0.100.0
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 1
+export AWS_BACKEND_PROFILE := profile
+
+export AWS_PROVIDER_PROFILE := profile
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +18,4 @@ 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_minimal_valid/terraform/global/Makefile b/testdata/v2_minimal_valid/terraform/global/Makefile
index 2c687122..b81c4ac3 100644
--- a/testdata/v2_minimal_valid/terraform/global/Makefile
+++ b/testdata/v2_minimal_valid/terraform/global/Makefile
@@ -4,6 +4,11 @@
 export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 0
+export AWS_BACKEND_PROFILE := foo
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +16,4 @@ 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/terraform/accounts/bar/Makefile b/testdata/v2_no_aws_provider/terraform/accounts/bar/Makefile
index 19d522a3..7f36ac3d 100644
--- a/testdata/v2_no_aws_provider/terraform/accounts/bar/Makefile
+++ b/testdata/v2_no_aws_provider/terraform/accounts/bar/Makefile
@@ -8,9 +8,12 @@ export ATLANTIS_ENABLED := 0
 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/terraform/accounts/foo/Makefile b/testdata/v2_no_aws_provider/terraform/accounts/foo/Makefile
index 19d522a3..7f36ac3d 100644
--- a/testdata/v2_no_aws_provider/terraform/accounts/foo/Makefile
+++ b/testdata/v2_no_aws_provider/terraform/accounts/foo/Makefile
@@ -8,9 +8,12 @@ export ATLANTIS_ENABLED := 0
 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/terraform/global/Makefile b/testdata/v2_no_aws_provider/terraform/global/Makefile
index 9f32bdea..c8e2dfc4 100644
--- a/testdata/v2_no_aws_provider/terraform/global/Makefile
+++ b/testdata/v2_no_aws_provider/terraform/global/Makefile
@@ -4,6 +4,11 @@
 export TERRAFORM_VERSION := 0.100.0
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
+export ATLANTIS_ENABLED := 0
+export AWS_BACKEND_PROFILE := profile
+
+
+
 
 include ../..//scripts/component.mk
 
@@ -11,3 +16,4 @@ 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
+