Repository: chanzuckerberg/fogg
Pull request #446 (2020-04-01 20:07:55)

[fix] Add closing brace to heroku provider configuration
### Summary
heroku provider was missing a closing brace


Patch:
diff --git a/templates/common/heroku_provider.tmpl b/templates/common/heroku_provider.tmpl
index f9625a1b..2b1fd83a 100644
--- a/templates/common/heroku_provider.tmpl
+++ b/templates/common/heroku_provider.tmpl
@@ -3,4 +3,5 @@ provider heroku {
 {{ if .Version -}}
   version = "~>{{ .Version }}"
 {{ end -}}
+}
 {{ end }}


Test patch:
diff --git a/testdata/v2_full_yaml/terraform/envs/prod/hero/fogg.tf b/testdata/v2_full_yaml/terraform/envs/prod/hero/fogg.tf
index f5dfd8dc..4f756824 100644
--- a/testdata/v2_full_yaml/terraform/envs/prod/hero/fogg.tf
+++ b/testdata/v2_full_yaml/terraform/envs/prod/hero/fogg.tf
@@ -26,191 +26,192 @@ provider aws {
 
 
 provider heroku {
+}
 
 
 
 
 
-  terraform {
-    required_version = "~>0.100.0"
-
+terraform {
+  required_version = "~>0.100.0"
 
-    backend s3 {
 
-      bucket = "buck"
+  backend s3 {
 
-      key     = "terraform/proj/envs/prod/components/hero.tfstate"
-      encrypt = true
-      region  = "us-west-2"
-      profile = "profile"
+    bucket = "buck"
 
-    }
+    key     = "terraform/proj/envs/prod/components/hero.tfstate"
+    encrypt = true
+    region  = "us-west-2"
+    profile = "profile"
 
   }
 
-  variable env {
-    type    = string
-    default = "prod"
-  }
+}
 
-  variable project {
-    type    = string
-    default = "proj"
-  }
+variable env {
+  type    = string
+  default = "prod"
+}
+
+variable project {
+  type    = string
+  default = "proj"
+}
 
 
-  variable region {
-    type    = string
-    default = "us-west-2"
-  }
+variable region {
+  type    = string
+  default = "us-west-2"
+}
 
 
-  variable component {
-    type    = string
-    default = "hero"
-  }
+variable component {
+  type    = string
+  default = "hero"
+}
 
 
-  variable aws_profile {
-    type    = string
-    default = "profile"
-  }
+variable aws_profile {
+  type    = string
+  default = "profile"
+}
 
 
 
-  variable owner {
-    type    = string
-    default = "foo@example.com"
-  }
+variable owner {
+  type    = string
+  default = "foo@example.com"
+}
 
-  variable tags {
-    type = map(string)
-    default = {
-      project   = "proj"
-      env       = "prod"
-      service   = "hero"
-      owner     = "foo@example.com"
-      managedBy = "terraform"
-    }
+variable tags {
+  type = map(string)
+  default = {
+    project   = "proj"
+    env       = "prod"
+    service   = "hero"
+    owner     = "foo@example.com"
+    managedBy = "terraform"
   }
+}
 
 
-  variable foo {
-    type    = string
-    default = "bar1"
-  }
+variable foo {
+  type    = string
+  default = "bar1"
+}
 
 
-  data terraform_remote_state global {
-    backend = "s3"
+data terraform_remote_state global {
+  backend = "s3"
 
-    config = {
+  config = {
 
 
-      bucket = "buck"
+    bucket = "buck"
 
-      key     = "terraform/proj/global.tfstate"
-      region  = "us-west-2"
-      profile = "profile"
+    key     = "terraform/proj/global.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
 
 
-    }
   }
+}
 
 
 
 
-  data terraform_remote_state datadog {
-    backend = "s3"
+data terraform_remote_state datadog {
+  backend = "s3"
 
-    config = {
+  config = {
 
 
-      bucket = "buck"
+    bucket = "buck"
 
-      key     = "terraform/proj/envs/prod/components/datadog.tfstate"
-      region  = "us-west-2"
-      profile = "profile"
+    key     = "terraform/proj/envs/prod/components/datadog.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
 
 
-    }
   }
+}
 
 
 
 
 
-  # remote state for accounts
+# remote state for accounts
 
-  data terraform_remote_state bar {
-    backend = "s3"
+data terraform_remote_state bar {
+  backend = "s3"
 
-    config = {
+  config = {
 
 
-      bucket = "buck"
+    bucket = "buck"
 
-      key     = "terraform/proj/accounts/bar.tfstate"
-      region  = "us-west-2"
-      profile = "profile"
+    key     = "terraform/proj/accounts/bar.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
 
 
-    }
   }
+}
 
-  data terraform_remote_state foo {
-    backend = "s3"
+data terraform_remote_state foo {
+  backend = "s3"
 
-    config = {
+  config = {
 
 
-      bucket = "buck"
+    bucket = "buck"
 
-      key     = "terraform/proj/accounts/foo.tfstate"
-      region  = "us-west-2"
-      profile = "profile"
+    key     = "terraform/proj/accounts/foo.tfstate"
+    region  = "us-west-2"
+    profile = "profile"
 
 
-    }
   }
+}
 
 
-  # map of aws_accounts
-  variable aws_accounts {
-    type = map
-    default = {
+# map of aws_accounts
+variable aws_accounts {
+  type = map
+  default = {
 
 
-      bar = 456
+    bar = 456
 
 
 
-      foo = 123
+    foo = 123
 
 
-    }
   }
+}
 
-  provider random {
-    version = "~> 2.2"
-  }
+provider random {
+  version = "~> 2.2"
+}
 
-  provider template {
-    version = "~> 2.1"
-  }
+provider template {
+  version = "~> 2.1"
+}
 
-  provider archive {
-    version = "~> 1.3"
-  }
+provider archive {
+  version = "~> 1.3"
+}
 
-  provider null {
-    version = "~> 2.1"
-  }
+provider null {
+  version = "~> 2.1"
+}
 
-  provider local {
-    version = "~> 1.4"
-  }
+provider local {
+  version = "~> 1.4"
+}
 
-  provider tls {
-    version = "~> 2.1"
-  }
+provider tls {
+  version = "~> 2.1"
+}