Repository: chanzuckerberg/fogg
Pull request #548 (2021-03-05 19:35:28)

[fix] check-auth on remote backend
When we are using a remote backend the local auth checks no longer make
sense, disable them by not setting the env variables for checking.

codecov[bot]: # [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/548?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`main@241730a`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##             main     #548   +/-   ##
=======================================
  Coverage        ?   55.27%           
=======================================
  Files           ?       21           
  Lines           ?     2039           
  Branches        ?        0           
=======================================
  Hits            ?     1127           
  Misses          ?      755           
  Partials        ?      157           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/548?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/548?src=pr&el=footer). Last update [241730a...6d64a78](https://codecov.io/gh/chanzuckerberg/fogg/pull/548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/templates/common/make_vars.tmpl b/templates/common/make_vars.tmpl
index 05f417b4..5080739c 100644
--- a/templates/common/make_vars.tmpl
+++ b/templates/common/make_vars.tmpl
@@ -3,11 +3,14 @@ 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 TF_BACKEND_KIND := {{ .Backend.Kind }}
-{{ if .Backend.S3 }}{{ if .Backend.S3.Profile}}export AWS_BACKEND_PROFILE := {{ .Backend.S3.Profile }}{{ end }}{{end}}
-{{ if .Backend.S3 }}{{ if .Backend.S3.RoleArn }}export AWS_BACKEND_ROLE_ARN := {{ .Backend.S3.RoleArn }}{{ end }}{{end}}
-{{ if .ProviderConfiguration.AWS }}{{ if .ProviderConfiguration.AWS.Profile }}export AWS_PROVIDER_PROFILE := {{ .ProviderConfiguration.AWS.Profile }}{{ end }}{{ end }}
-{{ if .ProviderConfiguration.AWS }}{{ if .ProviderConfiguration.AWS.RoleArn }}export AWS_PROVIDER_ROLE_ARN := {{ .ProviderConfiguration.AWS.RoleArn }}{{ end }}{{ end }}
+{{ if .Backend.S3 }}
+{{ if .Backend.S3.Profile}}export AWS_BACKEND_PROFILE := {{ .Backend.S3.Profile }}{{ end }}
+{{ if .Backend.S3.RoleArn }}export AWS_BACKEND_ROLE_ARN := {{ .Backend.S3.RoleArn }}{{ end }}
+{{ if .ProviderConfiguration.AWS }}
+{{ if .ProviderConfiguration.AWS.Profile }}export AWS_PROVIDER_PROFILE := {{ .ProviderConfiguration.AWS.Profile }}{{ end }}
+{{ if .ProviderConfiguration.AWS.RoleArn }}export AWS_PROVIDER_ROLE_ARN := {{ .ProviderConfiguration.AWS.RoleArn }}{{ end }}
 {{if .ProviderConfiguration.Heroku}}export HEROKU_PROVIDER := 1{{end}}
-
+{{ end }}
+{{ end }}
 include {{ .PathToRepoRoot }}/scripts/component.mk
 {{ end }}


Test patch:
diff --git a/testdata/bless_provider_yaml/terraform/accounts/foo/Makefile b/testdata/bless_provider_yaml/terraform/accounts/foo/Makefile
index 70ec2d6f..f3b9270b 100644
--- a/testdata/bless_provider_yaml/terraform/accounts/foo/Makefile
+++ b/testdata/bless_provider_yaml/terraform/accounts/foo/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foofoo
-
 
+export AWS_BACKEND_PROFILE := foofoo
 
 
 
diff --git a/testdata/bless_provider_yaml/terraform/envs/bar/bam/Makefile b/testdata/bless_provider_yaml/terraform/envs/bar/bam/Makefile
index 8dad7ed7..529c552c 100644
--- a/testdata/bless_provider_yaml/terraform/envs/bar/bam/Makefile
+++ b/testdata/bless_provider_yaml/terraform/envs/bar/bam/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foofoo
-
 
+export AWS_BACKEND_PROFILE := foofoo
 
 
 
diff --git a/testdata/bless_provider_yaml/terraform/global/Makefile b/testdata/bless_provider_yaml/terraform/global/Makefile
index 541f80c9..dc1cec4d 100644
--- a/testdata/bless_provider_yaml/terraform/global/Makefile
+++ b/testdata/bless_provider_yaml/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foofoo
-
 
+export AWS_BACKEND_PROFILE := foofoo
 
 
 
diff --git a/testdata/circleci/terraform/global/Makefile b/testdata/circleci/terraform/global/Makefile
index cf65e9f6..49b02a74 100644
--- a/testdata/circleci/terraform/global/Makefile
+++ b/testdata/circleci/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/github_actions/terraform/global/Makefile b/testdata/github_actions/terraform/global/Makefile
index cf65e9f6..49b02a74 100644
--- a/testdata/github_actions/terraform/global/Makefile
+++ b/testdata/github_actions/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/github_provider_yaml/terraform/accounts/foo/Makefile b/testdata/github_provider_yaml/terraform/accounts/foo/Makefile
index cb568e27..b91a7ecb 100644
--- a/testdata/github_provider_yaml/terraform/accounts/foo/Makefile
+++ b/testdata/github_provider_yaml/terraform/accounts/foo/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/github_provider_yaml/terraform/envs/bar/bam/Makefile b/testdata/github_provider_yaml/terraform/envs/bar/bam/Makefile
index 43c9b4de..93029265 100644
--- a/testdata/github_provider_yaml/terraform/envs/bar/bam/Makefile
+++ b/testdata/github_provider_yaml/terraform/envs/bar/bam/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/github_provider_yaml/terraform/global/Makefile b/testdata/github_provider_yaml/terraform/global/Makefile
index cf65e9f6..49b02a74 100644
--- a/testdata/github_provider_yaml/terraform/global/Makefile
+++ b/testdata/github_provider_yaml/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/okta_provider_yaml/terraform/accounts/foo/Makefile b/testdata/okta_provider_yaml/terraform/accounts/foo/Makefile
index 70ec2d6f..f3b9270b 100644
--- a/testdata/okta_provider_yaml/terraform/accounts/foo/Makefile
+++ b/testdata/okta_provider_yaml/terraform/accounts/foo/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foofoo
-
 
+export AWS_BACKEND_PROFILE := foofoo
 
 
 
diff --git a/testdata/okta_provider_yaml/terraform/envs/bar/bam/Makefile b/testdata/okta_provider_yaml/terraform/envs/bar/bam/Makefile
index 8dad7ed7..529c552c 100644
--- a/testdata/okta_provider_yaml/terraform/envs/bar/bam/Makefile
+++ b/testdata/okta_provider_yaml/terraform/envs/bar/bam/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foofoo
-
 
+export AWS_BACKEND_PROFILE := foofoo
 
 
 
diff --git a/testdata/okta_provider_yaml/terraform/global/Makefile b/testdata/okta_provider_yaml/terraform/global/Makefile
index 541f80c9..dc1cec4d 100644
--- a/testdata/okta_provider_yaml/terraform/global/Makefile
+++ b/testdata/okta_provider_yaml/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foofoo
-
 
+export AWS_BACKEND_PROFILE := foofoo
 
 
 
diff --git a/testdata/snowflake_provider_yaml/terraform/accounts/foo/Makefile b/testdata/snowflake_provider_yaml/terraform/accounts/foo/Makefile
index cb568e27..b91a7ecb 100644
--- a/testdata/snowflake_provider_yaml/terraform/accounts/foo/Makefile
+++ b/testdata/snowflake_provider_yaml/terraform/accounts/foo/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/snowflake_provider_yaml/terraform/envs/bar/bam/Makefile b/testdata/snowflake_provider_yaml/terraform/envs/bar/bam/Makefile
index 43c9b4de..93029265 100644
--- a/testdata/snowflake_provider_yaml/terraform/envs/bar/bam/Makefile
+++ b/testdata/snowflake_provider_yaml/terraform/envs/bar/bam/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/snowflake_provider_yaml/terraform/global/Makefile b/testdata/snowflake_provider_yaml/terraform/global/Makefile
index cf65e9f6..49b02a74 100644
--- a/testdata/snowflake_provider_yaml/terraform/global/Makefile
+++ b/testdata/snowflake_provider_yaml/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/tfe_provider_yaml/terraform/accounts/foo/Makefile b/testdata/tfe_provider_yaml/terraform/accounts/foo/Makefile
index cb568e27..b91a7ecb 100644
--- a/testdata/tfe_provider_yaml/terraform/accounts/foo/Makefile
+++ b/testdata/tfe_provider_yaml/terraform/accounts/foo/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/tfe_provider_yaml/terraform/envs/bar/bam/Makefile b/testdata/tfe_provider_yaml/terraform/envs/bar/bam/Makefile
index 43c9b4de..93029265 100644
--- a/testdata/tfe_provider_yaml/terraform/envs/bar/bam/Makefile
+++ b/testdata/tfe_provider_yaml/terraform/envs/bar/bam/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../../../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/tfe_provider_yaml/terraform/global/Makefile b/testdata/tfe_provider_yaml/terraform/global/Makefile
index cf65e9f6..49b02a74 100644
--- a/testdata/tfe_provider_yaml/terraform/global/Makefile
+++ b/testdata/tfe_provider_yaml/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/v2_full_yaml/fogg.yml b/testdata/v2_full_yaml/fogg.yml
index 541c29bc..c1b7ce62 100644
--- a/testdata/v2_full_yaml/fogg.yml
+++ b/testdata/v2_full_yaml/fogg.yml
@@ -80,6 +80,10 @@ envs:
         module_source: github.com/terraform-aws-modules/terraform-aws-vpc?ref=v1.30.0
         module_name: prod-vpc
   staging:
+    backend:
+      kind: remote
+      host_name: example.com
+      organization: foo
     components:
       comp_helm_template:
         eks:
diff --git a/testdata/v2_full_yaml/terraform/accounts/bar/Makefile b/testdata/v2_full_yaml/terraform/accounts/bar/Makefile
index 450b8264..083b2ba2 100644
--- a/testdata/v2_full_yaml/terraform/accounts/bar/Makefile
+++ b/testdata/v2_full_yaml/terraform/accounts/bar/Makefile
@@ -6,12 +6,15 @@ 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
 
 
+
 export AWS_PROVIDER_ROLE_ARN := arn:aws:iam::456:role/foo
 
 
+
 include ../../..//scripts/component.mk
 
 
diff --git a/testdata/v2_full_yaml/terraform/accounts/foo/Makefile b/testdata/v2_full_yaml/terraform/accounts/foo/Makefile
index 35bd9cf0..3caea00a 100644
--- a/testdata/v2_full_yaml/terraform/accounts/foo/Makefile
+++ b/testdata/v2_full_yaml/terraform/accounts/foo/Makefile
@@ -6,12 +6,15 @@ 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
 
 
+
 export AWS_PROVIDER_ROLE_ARN := arn:aws:iam::123:role/roll
 
 
+
 include ../../..//scripts/component.mk
 
 
diff --git a/testdata/v2_full_yaml/terraform/envs/prod/datadog/Makefile b/testdata/v2_full_yaml/terraform/envs/prod/datadog/Makefile
index 40858100..3c5e8e0c 100644
--- a/testdata/v2_full_yaml/terraform/envs/prod/datadog/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/prod/datadog/Makefile
@@ -6,12 +6,15 @@ 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
 
+
 export AWS_PROVIDER_PROFILE := profile
 
 
 
+
 include ../../../..//scripts/component.mk
 
 
diff --git a/testdata/v2_full_yaml/terraform/envs/prod/hero/Makefile b/testdata/v2_full_yaml/terraform/envs/prod/hero/Makefile
index 33ead7da..d39f8bb3 100644
--- a/testdata/v2_full_yaml/terraform/envs/prod/hero/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/prod/hero/Makefile
@@ -6,12 +6,15 @@ 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
 
+
 export AWS_PROVIDER_PROFILE := profile
 
 export HEROKU_PROVIDER := 1
 
+
 include ../../../..//scripts/component.mk
 
 
diff --git a/testdata/v2_full_yaml/terraform/envs/prod/okta/Makefile b/testdata/v2_full_yaml/terraform/envs/prod/okta/Makefile
index 40858100..3c5e8e0c 100644
--- a/testdata/v2_full_yaml/terraform/envs/prod/okta/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/prod/okta/Makefile
@@ -6,12 +6,15 @@ 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
 
+
 export AWS_PROVIDER_PROFILE := profile
 
 
 
+
 include ../../../..//scripts/component.mk
 
 
diff --git a/testdata/v2_full_yaml/terraform/envs/prod/sentry/Makefile b/testdata/v2_full_yaml/terraform/envs/prod/sentry/Makefile
index 40858100..3c5e8e0c 100644
--- a/testdata/v2_full_yaml/terraform/envs/prod/sentry/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/prod/sentry/Makefile
@@ -6,12 +6,15 @@ 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
 
+
 export AWS_PROVIDER_PROFILE := profile
 
 
 
+
 include ../../../..//scripts/component.mk
 
 
diff --git a/testdata/v2_full_yaml/terraform/envs/prod/vpc/Makefile b/testdata/v2_full_yaml/terraform/envs/prod/vpc/Makefile
index 40858100..3c5e8e0c 100644
--- a/testdata/v2_full_yaml/terraform/envs/prod/vpc/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/prod/vpc/Makefile
@@ -6,12 +6,15 @@ 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
 
+
 export AWS_PROVIDER_PROFILE := profile
 
 
 
+
 include ../../../..//scripts/component.mk
 
 
diff --git a/testdata/v2_full_yaml/terraform/envs/staging/comp1/Makefile b/testdata/v2_full_yaml/terraform/envs/staging/comp1/Makefile
index 5d6026aa..f56d5ab2 100644
--- a/testdata/v2_full_yaml/terraform/envs/staging/comp1/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/staging/comp1/Makefile
@@ -5,12 +5,7 @@
 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 := comp1
-
-export AWS_PROVIDER_PROFILE := profile
-
-
+export TF_BACKEND_KIND := remote
 
 include ../../../..//scripts/component.mk
 
diff --git a/testdata/v2_full_yaml/terraform/envs/staging/comp1/fogg.tf b/testdata/v2_full_yaml/terraform/envs/staging/comp1/fogg.tf
index 37fec99d..36cd224e 100644
--- a/testdata/v2_full_yaml/terraform/envs/staging/comp1/fogg.tf
+++ b/testdata/v2_full_yaml/terraform/envs/staging/comp1/fogg.tf
@@ -12,15 +12,13 @@ provider aws {
 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 = "comp1"
+  backend remote {
 
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces {
+      name = "staging-comp1"
+    }
 
   }
   required_providers {
@@ -129,30 +127,28 @@ data terraform_remote_state global {
   }
 }
 data terraform_remote_state comp2 {
-  backend = "s3"
+  backend = "remote"
   config = {
 
 
-    bucket = "buck"
-
-    key     = "terraform/proj/envs/staging/components/comp2.tfstate"
-    region  = "us-west-2"
-    profile = "profile"
-
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces = {
+      name = "staging-comp2"
+    }
 
   }
 }
 data terraform_remote_state vpc {
-  backend = "s3"
+  backend = "remote"
   config = {
 
 
-    bucket = "buck"
-
-    key     = "terraform/proj/envs/staging/components/vpc.tfstate"
-    region  = "us-west-2"
-    profile = "profile"
-
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces = {
+      name = "staging-vpc"
+    }
 
   }
 }
diff --git a/testdata/v2_full_yaml/terraform/envs/staging/comp2/Makefile b/testdata/v2_full_yaml/terraform/envs/staging/comp2/Makefile
index 40858100..f56d5ab2 100644
--- a/testdata/v2_full_yaml/terraform/envs/staging/comp2/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/staging/comp2/Makefile
@@ -5,12 +5,7 @@
 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
-
-export AWS_PROVIDER_PROFILE := profile
-
-
+export TF_BACKEND_KIND := remote
 
 include ../../../..//scripts/component.mk
 
diff --git a/testdata/v2_full_yaml/terraform/envs/staging/comp2/fogg.tf b/testdata/v2_full_yaml/terraform/envs/staging/comp2/fogg.tf
index 365d7f24..0d411993 100644
--- a/testdata/v2_full_yaml/terraform/envs/staging/comp2/fogg.tf
+++ b/testdata/v2_full_yaml/terraform/envs/staging/comp2/fogg.tf
@@ -12,15 +12,13 @@ provider aws {
 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"
+  backend remote {
 
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces {
+      name = "staging-comp2"
+    }
 
   }
   required_providers {
@@ -129,30 +127,28 @@ data terraform_remote_state global {
   }
 }
 data terraform_remote_state comp1 {
-  backend = "s3"
+  backend = "remote"
   config = {
 
 
-    bucket = "buck"
-
-    key     = "terraform/proj/envs/staging/components/comp1.tfstate"
-    region  = "us-west-2"
-    profile = "comp1"
-
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces = {
+      name = "staging-comp1"
+    }
 
   }
 }
 data terraform_remote_state vpc {
-  backend = "s3"
+  backend = "remote"
   config = {
 
 
-    bucket = "buck"
-
-    key     = "terraform/proj/envs/staging/components/vpc.tfstate"
-    region  = "us-west-2"
-    profile = "profile"
-
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces = {
+      name = "staging-vpc"
+    }
 
   }
 }
diff --git a/testdata/v2_full_yaml/terraform/envs/staging/vpc/Makefile b/testdata/v2_full_yaml/terraform/envs/staging/vpc/Makefile
index 40858100..f56d5ab2 100644
--- a/testdata/v2_full_yaml/terraform/envs/staging/vpc/Makefile
+++ b/testdata/v2_full_yaml/terraform/envs/staging/vpc/Makefile
@@ -5,12 +5,7 @@
 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
-
-export AWS_PROVIDER_PROFILE := profile
-
-
+export TF_BACKEND_KIND := remote
 
 include ../../../..//scripts/component.mk
 
diff --git a/testdata/v2_full_yaml/terraform/envs/staging/vpc/fogg.tf b/testdata/v2_full_yaml/terraform/envs/staging/vpc/fogg.tf
index 122f6567..90935898 100644
--- a/testdata/v2_full_yaml/terraform/envs/staging/vpc/fogg.tf
+++ b/testdata/v2_full_yaml/terraform/envs/staging/vpc/fogg.tf
@@ -12,15 +12,13 @@ provider aws {
 terraform {
   required_version = "=0.100.0"
 
-  backend s3 {
-
-    bucket = "buck"
-
-    key     = "terraform/proj/envs/staging/components/vpc.tfstate"
-    encrypt = true
-    region  = "us-west-2"
-    profile = "profile"
+  backend remote {
 
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces {
+      name = "staging-vpc"
+    }
 
   }
   required_providers {
@@ -129,30 +127,28 @@ data terraform_remote_state global {
   }
 }
 data terraform_remote_state comp1 {
-  backend = "s3"
+  backend = "remote"
   config = {
 
 
-    bucket = "buck"
-
-    key     = "terraform/proj/envs/staging/components/comp1.tfstate"
-    region  = "us-west-2"
-    profile = "comp1"
-
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces = {
+      name = "staging-comp1"
+    }
 
   }
 }
 data terraform_remote_state comp2 {
-  backend = "s3"
+  backend = "remote"
   config = {
 
 
-    bucket = "buck"
-
-    key     = "terraform/proj/envs/staging/components/comp2.tfstate"
-    region  = "us-west-2"
-    profile = "profile"
-
+    hostname     = "example.com"
+    organization = "foo"
+    workspaces = {
+      name = "staging-comp2"
+    }
 
   }
 }
diff --git a/testdata/v2_full_yaml/terraform/global/Makefile b/testdata/v2_full_yaml/terraform/global/Makefile
index 400f2ba5..20250d33 100644
--- a/testdata/v2_full_yaml/terraform/global/Makefile
+++ b/testdata/v2_full_yaml/terraform/global/Makefile
@@ -6,12 +6,15 @@ 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
 
+
 export AWS_PROVIDER_PROFILE := profile
 
 
 
+
 include ../..//scripts/component.mk
 
 
diff --git a/testdata/v2_minimal_valid_yaml/terraform/global/Makefile b/testdata/v2_minimal_valid_yaml/terraform/global/Makefile
index cf65e9f6..49b02a74 100644
--- a/testdata/v2_minimal_valid_yaml/terraform/global/Makefile
+++ b/testdata/v2_minimal_valid_yaml/terraform/global/Makefile
@@ -6,9 +6,8 @@ export TERRAFORM_VERSION := 1.1.1
 export TFLINT_ENABLED := 0
 export TF_PLUGIN_CACHE_DIR := ../..//.terraform.d/plugin-cache
 export TF_BACKEND_KIND := s3
-export AWS_BACKEND_PROFILE := foo
-
 
+export AWS_BACKEND_PROFILE := foo
 
 
 
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/Makefile
index e770aecc..ae0dfece 100644
--- a/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/Makefile
+++ b/testdata/v2_no_aws_provider_yaml/terraform/envs/staging/vpc/Makefile
@@ -6,9 +6,8 @@ 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
-
 
+export AWS_BACKEND_PROFILE := profile
 
 
 
diff --git a/testdata/v2_no_aws_provider_yaml/terraform/global/Makefile b/testdata/v2_no_aws_provider_yaml/terraform/global/Makefile
index 76b5e0b3..33c14080 100644
--- a/testdata/v2_no_aws_provider_yaml/terraform/global/Makefile
+++ b/testdata/v2_no_aws_provider_yaml/terraform/global/Makefile
@@ -6,9 +6,8 @@ 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
-
 
+export AWS_BACKEND_PROFILE := profile