Repository: chanzuckerberg/fogg
Pull request #480 (2020-05-27 20:30:53)

[fix] bug with unquoted account

### Test Plan
* CI

### References

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

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

```diff
@@           Coverage Diff           @@
##           master     #480   +/-   ##
=======================================
  Coverage   59.36%   59.36%           
=======================================
  Files          19       19           
  Lines        1996     1996           
=======================================
  Hits         1185     1185           
  Misses        653      653           
  Partials      158      158           
```



------

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


Patch:
diff --git a/templates/account/fogg.tf.tmpl b/templates/account/fogg.tf.tmpl
index bf44a624..fd03032b 100644
--- a/templates/account/fogg.tf.tmpl
+++ b/templates/account/fogg.tf.tmpl
@@ -69,7 +69,7 @@ variable owner {
 
 variable account {
     type = string
-    default = "{{ .AccountName }}
+    default = "{{ .AccountName }}"
 }
 
 # map of aws_accounts


Test patch:
diff --git a/testdata/bless_provider_yaml/terraform/accounts/foo/fogg.tf b/testdata/bless_provider_yaml/terraform/accounts/foo/fogg.tf
index 769b93ac..8b45cf6b 100644
--- a/testdata/bless_provider_yaml/terraform/accounts/foo/fogg.tf
+++ b/testdata/bless_provider_yaml/terraform/accounts/foo/fogg.tf
@@ -42,46 +42,46 @@ variable owner {
 }
 variable account {
   type    = string
-  default = "foo
+  default = "foo"
 }
 # map of aws_accounts
 variable aws_accounts {
-  type =  map
+  type = map
   default = {
-  
-    
-  
+
+
+
   }
 }
 data terraform_remote_state global {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " bucket "
-    
-    key            = " terraform / foofoo / global.tfstate "
-    region = " region "
-    profile = " foofoo "
-    
-  
+
+
+    bucket = "bucket"
+
+    key     = "terraform/foofoo/global.tfstate"
+    region  = "region"
+    profile = "foofoo"
+
+
   }
 }
 provider random {
-  version = " ~ > 2.2 "
+  version = "~> 2.2"
 }
 provider template {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider archive {
-  version = " ~ > 1.3 "
+  version = "~> 1.3"
 }
 provider null {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider local {
-  version = " ~ > 1.4 "
+  version = "~> 1.4"
 }
 provider tls {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
diff --git a/testdata/github_provider_yaml/terraform/accounts/foo/fogg.tf b/testdata/github_provider_yaml/terraform/accounts/foo/fogg.tf
index 2dd15bb2..e023f7a3 100644
--- a/testdata/github_provider_yaml/terraform/accounts/foo/fogg.tf
+++ b/testdata/github_provider_yaml/terraform/accounts/foo/fogg.tf
@@ -29,46 +29,46 @@ variable owner {
 }
 variable account {
   type    = string
-  default = "foo
+  default = "foo"
 }
 # map of aws_accounts
 variable aws_accounts {
-  type =  map
+  type = map
   default = {
-  
-    
-  
+
+
+
   }
 }
 data terraform_remote_state global {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " bucket "
-    
-    key            = " terraform / foo / global.tfstate "
-    region = " region "
-    profile = " foo "
-    
-  
+
+
+    bucket = "bucket"
+
+    key     = "terraform/foo/global.tfstate"
+    region  = "region"
+    profile = "foo"
+
+
   }
 }
 provider random {
-  version = " ~ > 2.2 "
+  version = "~> 2.2"
 }
 provider template {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider archive {
-  version = " ~ > 1.3 "
+  version = "~> 1.3"
 }
 provider null {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider local {
-  version = " ~ > 1.4 "
+  version = "~> 1.4"
 }
 provider tls {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
diff --git a/testdata/okta_provider_yaml/terraform/accounts/foo/fogg.tf b/testdata/okta_provider_yaml/terraform/accounts/foo/fogg.tf
index 437e38aa..86f4eb7b 100644
--- a/testdata/okta_provider_yaml/terraform/accounts/foo/fogg.tf
+++ b/testdata/okta_provider_yaml/terraform/accounts/foo/fogg.tf
@@ -30,46 +30,46 @@ variable owner {
 }
 variable account {
   type    = string
-  default = "foo
+  default = "foo"
 }
 # map of aws_accounts
 variable aws_accounts {
-  type =  map
+  type = map
   default = {
-  
-    
-  
+
+
+
   }
 }
 data terraform_remote_state global {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " bucket "
-    
-    key            = " terraform / foofoo / global.tfstate "
-    region = " region "
-    profile = " foofoo "
-    
-  
+
+
+    bucket = "bucket"
+
+    key     = "terraform/foofoo/global.tfstate"
+    region  = "region"
+    profile = "foofoo"
+
+
   }
 }
 provider random {
-  version = " ~ > 2.2 "
+  version = "~> 2.2"
 }
 provider template {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider archive {
-  version = " ~ > 1.3 "
+  version = "~> 1.3"
 }
 provider null {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider local {
-  version = " ~ > 1.4 "
+  version = "~> 1.4"
 }
 provider tls {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
diff --git a/testdata/snowflake_provider_yaml/terraform/accounts/foo/fogg.tf b/testdata/snowflake_provider_yaml/terraform/accounts/foo/fogg.tf
index 37ff5dec..d723371a 100644
--- a/testdata/snowflake_provider_yaml/terraform/accounts/foo/fogg.tf
+++ b/testdata/snowflake_provider_yaml/terraform/accounts/foo/fogg.tf
@@ -30,46 +30,46 @@ variable owner {
 }
 variable account {
   type    = string
-  default = "foo
+  default = "foo"
 }
 # map of aws_accounts
 variable aws_accounts {
-  type =  map
+  type = map
   default = {
-  
-    
-  
+
+
+
   }
 }
 data terraform_remote_state global {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " bucket "
-    
-    key            = " terraform / foo / global.tfstate "
-    region = " region "
-    profile = " foo "
-    
-  
+
+
+    bucket = "bucket"
+
+    key     = "terraform/foo/global.tfstate"
+    region  = "region"
+    profile = "foo"
+
+
   }
 }
 provider random {
-  version = " ~ > 2.2 "
+  version = "~> 2.2"
 }
 provider template {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider archive {
-  version = " ~ > 1.3 "
+  version = "~> 1.3"
 }
 provider null {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider local {
-  version = " ~ > 1.4 "
+  version = "~> 1.4"
 }
 provider tls {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
diff --git a/testdata/tfe_provider_yaml/terraform/accounts/foo/fogg.tf b/testdata/tfe_provider_yaml/terraform/accounts/foo/fogg.tf
index 79a07dfc..a5b6ba3a 100644
--- a/testdata/tfe_provider_yaml/terraform/accounts/foo/fogg.tf
+++ b/testdata/tfe_provider_yaml/terraform/accounts/foo/fogg.tf
@@ -28,46 +28,46 @@ variable owner {
 }
 variable account {
   type    = string
-  default = "foo
+  default = "foo"
 }
 # map of aws_accounts
 variable aws_accounts {
-  type =  map
+  type = map
   default = {
-  
-    
-  
+
+
+
   }
 }
 data terraform_remote_state global {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " bucket "
-    
-    key            = " terraform / foo / global.tfstate "
-    region = " region "
-    profile = " foo "
-    
-  
+
+
+    bucket = "bucket"
+
+    key     = "terraform/foo/global.tfstate"
+    region  = "region"
+    profile = "foo"
+
+
   }
 }
 provider random {
-  version = " ~ > 2.2 "
+  version = "~> 2.2"
 }
 provider template {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider archive {
-  version = " ~ > 1.3 "
+  version = "~> 1.3"
 }
 provider null {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider local {
-  version = " ~ > 1.4 "
+  version = "~> 1.4"
 }
 provider tls {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
diff --git a/testdata/v2_full_yaml/terraform/accounts/bar/fogg.tf b/testdata/v2_full_yaml/terraform/accounts/bar/fogg.tf
index 61c96046..90147248 100644
--- a/testdata/v2_full_yaml/terraform/accounts/bar/fogg.tf
+++ b/testdata/v2_full_yaml/terraform/accounts/bar/fogg.tf
@@ -70,70 +70,70 @@ variable owner {
 }
 variable account {
   type    = string
-  default = "bar
+  default = "bar"
 }
 # map of aws_accounts
 variable aws_accounts {
-  type =  map
+  type = map
   default = {
-  
-    
-        bar = 456
-    
-  
-    
-        foo = 123
-    
-  
+
+
+    bar = 456
+
+
+
+    foo = 123
+
+
   }
 }
 variable foo {
-  type =  string
-  default = " bar1 "
+  type    = string
+  default = "bar1"
 }
 data terraform_remote_state global {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " buck "
-    
-    key            = " terraform / proj / global.tfstate "
-    region = " us-west-2 "
-    profile = " profile "
-    
-  
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/global.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
   }
 }
 data terraform_remote_state foo {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " buck "
-    
-    key            = " terraform / proj / accounts / foo.tfstate "
-    region = " us-west-2 "
-    profile = " profile "
-    
-  
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/foo.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
   }
 }
 provider random {
-  version = " ~ > 2.2 "
+  version = "~> 2.2"
 }
 provider template {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider archive {
-  version = " ~ > 1.3 "
+  version = "~> 1.3"
 }
 provider null {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider local {
-  version = " ~ > 1.4 "
+  version = "~> 1.4"
 }
 provider tls {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
diff --git a/testdata/v2_full_yaml/terraform/accounts/foo/fogg.tf b/testdata/v2_full_yaml/terraform/accounts/foo/fogg.tf
index baa435b4..347b9d2d 100644
--- a/testdata/v2_full_yaml/terraform/accounts/foo/fogg.tf
+++ b/testdata/v2_full_yaml/terraform/accounts/foo/fogg.tf
@@ -42,70 +42,70 @@ variable owner {
 }
 variable account {
   type    = string
-  default = "foo
+  default = "foo"
 }
 # map of aws_accounts
 variable aws_accounts {
-  type =  map
+  type = map
   default = {
-  
-    
-        bar = 456
-    
-  
-    
-        foo = 123
-    
-  
+
+
+    bar = 456
+
+
+
+    foo = 123
+
+
   }
 }
 variable foo {
-  type =  string
-  default = " bar1 "
+  type    = string
+  default = "bar1"
 }
 data terraform_remote_state global {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " buck "
-    
-    key            = " terraform / proj / global.tfstate "
-    region = " us-west-2 "
-    profile = " profile "
-    
-  
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/global.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
   }
 }
 data terraform_remote_state bar {
-  backend = " s3 "
+  backend = "s3"
   config = {
-    
-  
-    bucket         = " buck "
-    
-    key            = " terraform / proj / accounts / bar.tfstate "
-    region = " us-west-2 "
-    profile = " profile "
-    
-  
+
+
+    bucket = "buck"
+
+    key     = "terraform/proj/accounts/bar.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
+
+
   }
 }
 provider random {
-  version = " ~ > 2.2 "
+  version = "~> 2.2"
 }
 provider template {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider archive {
-  version = " ~ > 1.3 "
+  version = "~> 1.3"
 }
 provider null {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }
 provider local {
-  version = " ~ > 1.4 "
+  version = "~> 1.4"
 }
 provider tls {
-  version = " ~ > 2.1 "
+  version = "~> 2.1"
 }