Repository: segmentio/terraform-docs
Pull request #260 (2020-05-13 13:24:19)

build(deps): bump gopkg.in/yaml.v2 from 2.2.8 to 3.0.0
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.8 to 2.3.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/go-yaml/yaml/commit/0b1645d91e851e735d3e23330303ce81f70adbe3"><code>0b1645d</code></a> Set the default line length to infinity (-1) (<a href="https://github-redirect.dependabot.com/go-yaml/yaml/issues/571">#571</a>)</li>
<li>See full diff in <a href="https://github.com/go-yaml/yaml/compare/v2.2.8...v2.3.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=gopkg.in/yaml.v2&package-manager=go_modules&previous-version=2.2.8&new-version=2.3.0)](https://dependabot.com/compatibility-score/?dependency-name=gopkg.in/yaml.v2&package-manager=go_modules&previous-version=2.2.8&new-version=2.3.0)

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)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

codecov-io: # [Codecov](https://codecov.io/gh/segmentio/terraform-docs/pull/260?src=pr&el=h1) Report
> Merging [#260](https://codecov.io/gh/segmentio/terraform-docs/pull/260?src=pr&el=desc) into [master](https://codecov.io/gh/segmentio/terraform-docs/commit/8d9c54f1dfda76592a5fac50af37735b99f5243f&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

```diff
@@           Coverage Diff           @@
##           master     #260   +/-   ##
=======================================
  Coverage   81.48%   81.48%           
=======================================
  Files          33       33           
  Lines        1766     1766           
=======================================
  Hits         1439     1439           
  Misses        273      273           
  Partials       54       54           
```




Patch:
diff --git a/docs/formats/yaml.md b/docs/formats/yaml.md
index e246fcf..c845d61 100644
--- a/docs/formats/yaml.md
+++ b/docs/formats/yaml.md
@@ -81,214 +81,213 @@ generates the following output:
       | Foo  | Foo description |
       | Bar  | Bar description |
     inputs:
-    - name: bool-1
-      type: bool
-      description: It's bool number one.
-      default: true
-      required: false
-    - name: bool-2
-      type: bool
-      description: It's bool number two.
-      default: false
-      required: false
-    - name: bool-3
-      type: bool
-      description: null
-      default: true
-      required: false
-    - name: bool_default_false
-      type: bool
-      description: null
-      default: false
-      required: false
-    - name: input-with-code-block
-      type: list
-      description: "This is a complicated one. We need a newline.  \nAnd an example in
-        a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-      default:
-      - name rack:location
-      required: false
-    - name: input-with-pipe
-      type: string
-      description: It includes v1 | v2 | v3
-      default: v1
-      required: false
-    - name: input_with_underscores
-      type: any
-      description: A variable with underscores.
-      default: null
-      required: true
-    - name: list-1
-      type: list
-      description: It's list number one.
-      default:
-      - a
-      - b
-      - c
-      required: false
-    - name: list-2
-      type: list
-      description: It's list number two.
-      default: null
-      required: true
-    - name: list-3
-      type: list
-      description: null
-      default: []
-      required: false
-    - name: list_default_empty
-      type: list(string)
-      description: null
-      default: []
-      required: false
-    - name: long_type
-      type: |-
-        object({
-            name = string,
-            foo  = object({ foo = string, bar = string }),
-            bar  = object({ foo = string, bar = string }),
-            fizz = list(string),
-            buzz = list(string)
-          })
-      description: |
-        This description is itself markdown.
+      - name: bool-1
+        type: bool
+        description: It's bool number one.
+        default: true
+        required: false
+      - name: bool-2
+        type: bool
+        description: It's bool number two.
+        default: false
+        required: false
+      - name: bool-3
+        type: bool
+        description: null
+        default: true
+        required: false
+      - name: bool_default_false
+        type: bool
+        description: null
+        default: false
+        required: false
+      - name: input-with-code-block
+        type: list
+        description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+        default:
+          - name rack:location
+        required: false
+      - name: input-with-pipe
+        type: string
+        description: It includes v1 | v2 | v3
+        default: v1
+        required: false
+      - name: input_with_underscores
+        type: any
+        description: A variable with underscores.
+        default: null
+        required: true
+      - name: list-1
+        type: list
+        description: It's list number one.
+        default:
+          - a
+          - b
+          - c
+        required: false
+      - name: list-2
+        type: list
+        description: It's list number two.
+        default: null
+        required: true
+      - name: list-3
+        type: list
+        description: null
+        default: []
+        required: false
+      - name: list_default_empty
+        type: list(string)
+        description: null
+        default: []
+        required: false
+      - name: long_type
+        type: |-
+          object({
+              name = string,
+              foo  = object({ foo = string, bar = string }),
+              bar  = object({ foo = string, bar = string }),
+              fizz = list(string),
+              buzz = list(string)
+            })
+        description: |
+          This description is itself markdown.
 
-        It spans over multiple lines.
-      default:
-        bar:
-          bar: bar
-          foo: bar
-        buzz:
-        - fizz
-        - buzz
-        fizz: []
-        foo:
-          bar: foo
-          foo: foo
-        name: hello
-      required: false
-    - name: map-1
-      type: map
-      description: It's map number one.
-      default:
-        a: 1
-        b: 2
-        c: 3
-      required: false
-    - name: map-2
-      type: map
-      description: It's map number two.
-      default: null
-      required: true
-    - name: map-3
-      type: map
-      description: null
-      default: {}
-      required: false
-    - name: no-escape-default-value
-      type: string
-      description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-      default: VALUE_WITH_UNDERSCORE
-      required: false
-    - name: number-1
-      type: number
-      description: It's number number one.
-      default: 42
-      required: false
-    - name: number-2
-      type: number
-      description: It's number number two.
-      default: null
-      required: true
-    - name: number-3
-      type: number
-      description: null
-      default: "19"
-      required: false
-    - name: number-4
-      type: number
-      description: null
-      default: 15.75
-      required: false
-    - name: number_default_zero
-      type: number
-      description: null
-      default: 0
-      required: false
-    - name: object_default_empty
-      type: object({})
-      description: null
-      default: {}
-      required: false
-    - name: string-1
-      type: string
-      description: It's string number one.
-      default: bar
-      required: false
-    - name: string-2
-      type: string
-      description: It's string number two.
-      default: null
-      required: true
-    - name: string-3
-      type: string
-      description: null
-      default: ""
-      required: false
-    - name: string_default_empty
-      type: string
-      description: null
-      default: ""
-      required: false
-    - name: string_default_null
-      type: string
-      description: null
-      default: null
-      required: false
-    - name: string_no_default
-      type: string
-      description: null
-      default: null
-      required: true
-    - name: unquoted
-      type: any
-      description: null
-      default: null
-      required: true
-    - name: with-url
-      type: string
-      description: The description contains url. https://www.domain.com/foo/bar_baz.html
-      default: ""
-      required: false
+          It spans over multiple lines.
+        default:
+          bar:
+            bar: bar
+            foo: bar
+          buzz:
+            - fizz
+            - buzz
+          fizz: []
+          foo:
+            bar: foo
+            foo: foo
+          name: hello
+        required: false
+      - name: map-1
+        type: map
+        description: It's map number one.
+        default:
+          a: 1
+          b: 2
+          c: 3
+        required: false
+      - name: map-2
+        type: map
+        description: It's map number two.
+        default: null
+        required: true
+      - name: map-3
+        type: map
+        description: null
+        default: {}
+        required: false
+      - name: no-escape-default-value
+        type: string
+        description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+        default: VALUE_WITH_UNDERSCORE
+        required: false
+      - name: number-1
+        type: number
+        description: It's number number one.
+        default: 42
+        required: false
+      - name: number-2
+        type: number
+        description: It's number number two.
+        default: null
+        required: true
+      - name: number-3
+        type: number
+        description: null
+        default: "19"
+        required: false
+      - name: number-4
+        type: number
+        description: null
+        default: 15.75
+        required: false
+      - name: number_default_zero
+        type: number
+        description: null
+        default: 0
+        required: false
+      - name: object_default_empty
+        type: object({})
+        description: null
+        default: {}
+        required: false
+      - name: string-1
+        type: string
+        description: It's string number one.
+        default: bar
+        required: false
+      - name: string-2
+        type: string
+        description: It's string number two.
+        default: null
+        required: true
+      - name: string-3
+        type: string
+        description: null
+        default: ""
+        required: false
+      - name: string_default_empty
+        type: string
+        description: null
+        default: ""
+        required: false
+      - name: string_default_null
+        type: string
+        description: null
+        default: null
+        required: false
+      - name: string_no_default
+        type: string
+        description: null
+        default: null
+        required: true
+      - name: unquoted
+        type: any
+        description: null
+        default: null
+        required: true
+      - name: with-url
+        type: string
+        description: The description contains url. https://www.domain.com/foo/bar_baz.html
+        default: ""
+        required: false
     outputs:
-    - name: output-0.12
-      description: terraform 0.12 only
-    - name: output-1
-      description: It's output number one.
-    - name: output-2
-      description: It's output number two.
-    - name: unquoted
-      description: It's unquoted output.
+      - name: output-0.12
+        description: terraform 0.12 only
+      - name: output-1
+        description: It's output number one.
+      - name: output-2
+        description: It's output number two.
+      - name: unquoted
+        description: It's unquoted output.
     providers:
-    - name: aws
-      alias: null
-      version: '>= 2.15.0'
-    - name: aws
-      alias: ident
-      version: '>= 2.15.0'
-    - name: "null"
-      alias: null
-      version: null
-    - name: tls
-      alias: null
-      version: null
+      - name: aws
+        alias: null
+        version: '>= 2.15.0'
+      - name: aws
+        alias: ident
+        version: '>= 2.15.0'
+      - name: "null"
+        alias: null
+        version: null
+      - name: tls
+        alias: null
+        version: null
     requirements:
-    - name: terraform
-      version: '>= 0.12'
-    - name: aws
-      version: '>= 2.15.0'
-    - name: random
-      version: '>= 2.2.0'
+      - name: terraform
+        version: '>= 0.12'
+      - name: aws
+        version: '>= 2.15.0'
+      - name: random
+        version: '>= 2.2.0'
 
 
-###### Auto generated by spf13/cobra on 13-Apr-2020
+###### Auto generated by spf13/cobra on 13-May-2020
diff --git a/go.mod b/go.mod
index 76b3977..a14023b 100644
--- a/go.mod
+++ b/go.mod
@@ -11,6 +11,6 @@ require (
 	github.com/spf13/cobra v1.0.0
 	github.com/stretchr/testify v1.5.1
 	github.com/zclconf/go-cty v1.4.0
-	gopkg.in/yaml.v2 v2.2.8
+	gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86
 	mvdan.cc/xurls/v2 v2.2.0
 )
diff --git a/go.sum b/go.sum
index d80393b..bf3bdb3 100644
--- a/go.sum
+++ b/go.sum
@@ -182,8 +182,8 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl
 gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86 h1:OfFoIUYv/me30yv7XlMy4F9RJw8DEm8WQ6QG1Ph4bH0=
+gopkg.in/yaml.v3 v3.0.0-20200506231410-2ff61e1afc86/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099 h1:XJP7lxbSxWLOMNdBE4B/STaqVy6L73o0knwj2vIlxnw=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
diff --git a/internal/format/yaml.go b/internal/format/yaml.go
index 6720815..7d04d79 100644
--- a/internal/format/yaml.go
+++ b/internal/format/yaml.go
@@ -1,11 +1,12 @@
 package format
 
 import (
+	"bytes"
 	"strings"
 
 	"github.com/segmentio/terraform-docs/pkg/print"
 	"github.com/segmentio/terraform-docs/pkg/tfconf"
-	"gopkg.in/yaml.v2"
+	"gopkg.in/yaml.v3"
 )
 
 // YAML represents YAML format.
@@ -42,10 +43,15 @@ func (y *YAML) Print(module *tfconf.Module, settings *print.Settings) (string, e
 		copy.Requirements = module.Requirements
 	}
 
-	out, err := yaml.Marshal(copy)
+	buffer := new(bytes.Buffer)
+
+	encoder := yaml.NewEncoder(buffer)
+	encoder.SetIndent(2)
+
+	err := encoder.Encode(copy)
 	if err != nil {
 		return "", err
 	}
 
-	return strings.TrimSuffix(string(out), "\n"), nil
+	return strings.TrimSuffix(buffer.String(), "\n"), nil
 }
diff --git a/internal/types/types.go b/internal/types/types.go
index fbe10c0..6c24853 100644
--- a/internal/types/types.go
+++ b/internal/types/types.go
@@ -152,7 +152,7 @@ func (s String) MarshalYAML() (interface{}, error) {
 	if len(string(s)) == 0 || string(s) == `""` {
 		return nil, nil
 	}
-	return s, nil
+	return string(s), nil
 }
 
 // Empty represents an empty 'string' which is marshaled to `""` in JSON and YAML
diff --git a/pkg/tfconf/output.go b/pkg/tfconf/output.go
index e30cbab..5a48e00 100644
--- a/pkg/tfconf/output.go
+++ b/pkg/tfconf/output.go
@@ -112,5 +112,5 @@ func (o *Output) MarshalYAML() (interface{}, error) {
 	}
 	o.Value = nil       // explicitly make empty
 	o.Sensitive = false // explicitly make empty
-	return o, nil
+	return *o, nil
 }


Test patch:
diff --git a/internal/format/testdata/yaml/yaml-HeaderFromADOCFile.golden b/internal/format/testdata/yaml/yaml-HeaderFromADOCFile.golden
index 2ae93d3..d5ce21a 100644
--- a/internal/format/testdata/yaml/yaml-HeaderFromADOCFile.golden
+++ b/internal/format/testdata/yaml/yaml-HeaderFromADOCFile.golden
@@ -8,211 +8,210 @@ header: |
   Duis aute irure dolor in reprehenderit in voluptate velit
   esse cillum dolore eu fugiat nulla pariatur.
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-HeaderFromMDFile.golden b/internal/format/testdata/yaml/yaml-HeaderFromMDFile.golden
index ff361d1..06d4521 100644
--- a/internal/format/testdata/yaml/yaml-HeaderFromMDFile.golden
+++ b/internal/format/testdata/yaml/yaml-HeaderFromMDFile.golden
@@ -8,211 +8,210 @@ header: |
   Duis aute irure dolor in reprehenderit in voluptate velit
   esse cillum dolore eu fugiat nulla pariatur.
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-HeaderFromTFFile.golden b/internal/format/testdata/yaml/yaml-HeaderFromTFFile.golden
index 6f631bb..affe8bb 100644
--- a/internal/format/testdata/yaml/yaml-HeaderFromTFFile.golden
+++ b/internal/format/testdata/yaml/yaml-HeaderFromTFFile.golden
@@ -8,211 +8,210 @@ header: |-
   Duis aute irure dolor in reprehenderit in voluptate velit
   esse cillum dolore eu fugiat nulla pariatur.
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-HeaderFromTXTFile.golden b/internal/format/testdata/yaml/yaml-HeaderFromTXTFile.golden
index 2e1d993..d56dee1 100644
--- a/internal/format/testdata/yaml/yaml-HeaderFromTXTFile.golden
+++ b/internal/format/testdata/yaml/yaml-HeaderFromTXTFile.golden
@@ -8,211 +8,210 @@ header: |
   Duis aute irure dolor in reprehenderit in voluptate velit
   esse cillum dolore eu fugiat nulla pariatur.
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-NoHeader.golden b/internal/format/testdata/yaml/yaml-NoHeader.golden
index 963e051..2be0a12 100644
--- a/internal/format/testdata/yaml/yaml-NoHeader.golden
+++ b/internal/format/testdata/yaml/yaml-NoHeader.golden
@@ -1,210 +1,209 @@
 header: ""
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-NoInputs.golden b/internal/format/testdata/yaml/yaml-NoInputs.golden
index 1f6c61d..a1560e7 100644
--- a/internal/format/testdata/yaml/yaml-NoInputs.golden
+++ b/internal/format/testdata/yaml/yaml-NoInputs.golden
@@ -38,31 +38,31 @@ header: |-
   | Bar  | Bar description |
 inputs: []
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-NoOutputs.golden b/internal/format/testdata/yaml/yaml-NoOutputs.golden
index debbdd2..4ed3371 100644
--- a/internal/format/testdata/yaml/yaml-NoOutputs.golden
+++ b/internal/format/testdata/yaml/yaml-NoOutputs.golden
@@ -37,203 +37,202 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs: []
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-NoProviders.golden b/internal/format/testdata/yaml/yaml-NoProviders.golden
index 704c3c6..9ee6558 100644
--- a/internal/format/testdata/yaml/yaml-NoProviders.golden
+++ b/internal/format/testdata/yaml/yaml-NoProviders.golden
@@ -37,199 +37,198 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers: []
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-NoRequirements.golden b/internal/format/testdata/yaml/yaml-NoRequirements.golden
index 5efe5d1..f0867de 100644
--- a/internal/format/testdata/yaml/yaml-NoRequirements.golden
+++ b/internal/format/testdata/yaml/yaml-NoRequirements.golden
@@ -37,205 +37,204 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements: []
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-OnlyInputs.golden b/internal/format/testdata/yaml/yaml-OnlyInputs.golden
index bc6f852..da4bd84 100644
--- a/internal/format/testdata/yaml/yaml-OnlyInputs.golden
+++ b/internal/format/testdata/yaml/yaml-OnlyInputs.golden
@@ -1,184 +1,183 @@
 header: ""
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs: []
 providers: []
 requirements: []
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-OnlyOutputs.golden b/internal/format/testdata/yaml/yaml-OnlyOutputs.golden
index fc66ba4..70adc5b 100644
--- a/internal/format/testdata/yaml/yaml-OnlyOutputs.golden
+++ b/internal/format/testdata/yaml/yaml-OnlyOutputs.golden
@@ -1,13 +1,13 @@
 header: ""
 inputs: []
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers: []
 requirements: []
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-OnlyProviders.golden b/internal/format/testdata/yaml/yaml-OnlyProviders.golden
index 87cc676..b83f2cb 100644
--- a/internal/format/testdata/yaml/yaml-OnlyProviders.golden
+++ b/internal/format/testdata/yaml/yaml-OnlyProviders.golden
@@ -2,16 +2,16 @@ header: ""
 inputs: []
 outputs: []
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements: []
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-OnlyRequirements.golden b/internal/format/testdata/yaml/yaml-OnlyRequirements.golden
index 1351216..a16aa40 100644
--- a/internal/format/testdata/yaml/yaml-OnlyRequirements.golden
+++ b/internal/format/testdata/yaml/yaml-OnlyRequirements.golden
@@ -3,9 +3,9 @@ inputs: []
 outputs: []
 providers: []
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-OutputValues.golden b/internal/format/testdata/yaml/yaml-OutputValues.golden
index 3f8f00e..2e64ab0 100644
--- a/internal/format/testdata/yaml/yaml-OutputValues.golden
+++ b/internal/format/testdata/yaml/yaml-OutputValues.golden
@@ -37,222 +37,221 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-  value:
-    leon: cat
-  sensitive: false
-- name: output-2
-  description: It's output number two.
-  value:
-  - jack
-  - lola
-  sensitive: false
-- name: output-1
-  description: It's output number one.
-  value: 1
-  sensitive: false
-- name: output-0.12
-  description: terraform 0.12 only
-  value: <sensitive>
-  sensitive: true
+  - name: unquoted
+    description: It's unquoted output.
+    value:
+      leon: cat
+    sensitive: false
+  - name: output-2
+    description: It's output number two.
+    value:
+      - jack
+      - lola
+    sensitive: false
+  - name: output-1
+    description: It's output number one.
+    value: 1
+    sensitive: false
+  - name: output-0.12
+    description: terraform 0.12 only
+    value: <sensitive>
+    sensitive: true
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-SortByName.golden b/internal/format/testdata/yaml/yaml-SortByName.golden
index 10330fd..388cac3 100644
--- a/internal/format/testdata/yaml/yaml-SortByName.golden
+++ b/internal/format/testdata/yaml/yaml-SortByName.golden
@@ -37,211 +37,210 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
 outputs:
-- name: output-0.12
-  description: terraform 0.12 only
-- name: output-1
-  description: It's output number one.
-- name: output-2
-  description: It's output number two.
-- name: unquoted
-  description: It's unquoted output.
+  - name: output-0.12
+    description: terraform 0.12 only
+  - name: output-1
+    description: It's output number one.
+  - name: output-2
+    description: It's output number two.
+  - name: unquoted
+    description: It's unquoted output.
 providers:
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
-- name: tls
-  alias: null
-  version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
+  - name: tls
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-SortByRequired.golden b/internal/format/testdata/yaml/yaml-SortByRequired.golden
index 83c5ea2..533d9f5 100644
--- a/internal/format/testdata/yaml/yaml-SortByRequired.golden
+++ b/internal/format/testdata/yaml/yaml-SortByRequired.golden
@@ -37,211 +37,210 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
 outputs:
-- name: output-0.12
-  description: terraform 0.12 only
-- name: output-1
-  description: It's output number one.
-- name: output-2
-  description: It's output number two.
-- name: unquoted
-  description: It's unquoted output.
+  - name: output-0.12
+    description: terraform 0.12 only
+  - name: output-1
+    description: It's output number one.
+  - name: output-2
+    description: It's output number two.
+  - name: unquoted
+    description: It's unquoted output.
 providers:
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
-- name: tls
-  alias: null
-  version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
+  - name: tls
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml-SortByType.golden b/internal/format/testdata/yaml/yaml-SortByType.golden
index 6c905dc..3a2ab32 100644
--- a/internal/format/testdata/yaml/yaml-SortByType.golden
+++ b/internal/format/testdata/yaml/yaml-SortByType.golden
@@ -37,211 +37,210 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
 outputs:
-- name: output-0.12
-  description: terraform 0.12 only
-- name: output-1
-  description: It's output number one.
-- name: output-2
-  description: It's output number two.
-- name: unquoted
-  description: It's unquoted output.
+  - name: output-0.12
+    description: terraform 0.12 only
+  - name: output-1
+    description: It's output number one.
+  - name: output-2
+    description: It's output number two.
+  - name: unquoted
+    description: It's unquoted output.
 providers:
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
-- name: tls
-  alias: null
-  version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
+  - name: tls
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/format/testdata/yaml/yaml.golden b/internal/format/testdata/yaml/yaml.golden
index d00c25d..2bdd9f1 100644
--- a/internal/format/testdata/yaml/yaml.golden
+++ b/internal/format/testdata/yaml/yaml.golden
@@ -37,211 +37,210 @@ header: |-
   | Foo  | Foo description |
   | Bar  | Bar description |
 inputs:
-- name: unquoted
-  type: any
-  description: null
-  default: null
-  required: true
-- name: bool-3
-  type: bool
-  description: null
-  default: true
-  required: false
-- name: bool-2
-  type: bool
-  description: It's bool number two.
-  default: false
-  required: false
-- name: bool-1
-  type: bool
-  description: It's bool number one.
-  default: true
-  required: false
-- name: string-3
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string-2
-  type: string
-  description: It's string number two.
-  default: null
-  required: true
-- name: string-1
-  type: string
-  description: It's string number one.
-  default: bar
-  required: false
-- name: number-3
-  type: number
-  description: null
-  default: "19"
-  required: false
-- name: number-4
-  type: number
-  description: null
-  default: 15.75
-  required: false
-- name: number-2
-  type: number
-  description: It's number number two.
-  default: null
-  required: true
-- name: number-1
-  type: number
-  description: It's number number one.
-  default: 42
-  required: false
-- name: map-3
-  type: map
-  description: null
-  default: {}
-  required: false
-- name: map-2
-  type: map
-  description: It's map number two.
-  default: null
-  required: true
-- name: map-1
-  type: map
-  description: It's map number one.
-  default:
-    a: 1
-    b: 2
-    c: 3
-  required: false
-- name: list-3
-  type: list
-  description: null
-  default: []
-  required: false
-- name: list-2
-  type: list
-  description: It's list number two.
-  default: null
-  required: true
-- name: list-1
-  type: list
-  description: It's list number one.
-  default:
-  - a
-  - b
-  - c
-  required: false
-- name: input_with_underscores
-  type: any
-  description: A variable with underscores.
-  default: null
-  required: true
-- name: input-with-pipe
-  type: string
-  description: It includes v1 | v2 | v3
-  default: v1
-  required: false
-- name: input-with-code-block
-  type: list
-  description: "This is a complicated one. We need a newline.  \nAnd an example in
-    a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
-  default:
-  - name rack:location
-  required: false
-- name: long_type
-  type: |-
-    object({
-        name = string,
-        foo  = object({ foo = string, bar = string }),
-        bar  = object({ foo = string, bar = string }),
-        fizz = list(string),
-        buzz = list(string)
-      })
-  description: |
-    This description is itself markdown.
+  - name: unquoted
+    type: any
+    description: null
+    default: null
+    required: true
+  - name: bool-3
+    type: bool
+    description: null
+    default: true
+    required: false
+  - name: bool-2
+    type: bool
+    description: It's bool number two.
+    default: false
+    required: false
+  - name: bool-1
+    type: bool
+    description: It's bool number one.
+    default: true
+    required: false
+  - name: string-3
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string-2
+    type: string
+    description: It's string number two.
+    default: null
+    required: true
+  - name: string-1
+    type: string
+    description: It's string number one.
+    default: bar
+    required: false
+  - name: number-3
+    type: number
+    description: null
+    default: "19"
+    required: false
+  - name: number-4
+    type: number
+    description: null
+    default: 15.75
+    required: false
+  - name: number-2
+    type: number
+    description: It's number number two.
+    default: null
+    required: true
+  - name: number-1
+    type: number
+    description: It's number number one.
+    default: 42
+    required: false
+  - name: map-3
+    type: map
+    description: null
+    default: {}
+    required: false
+  - name: map-2
+    type: map
+    description: It's map number two.
+    default: null
+    required: true
+  - name: map-1
+    type: map
+    description: It's map number one.
+    default:
+      a: 1
+      b: 2
+      c: 3
+    required: false
+  - name: list-3
+    type: list
+    description: null
+    default: []
+    required: false
+  - name: list-2
+    type: list
+    description: It's list number two.
+    default: null
+    required: true
+  - name: list-1
+    type: list
+    description: It's list number one.
+    default:
+      - a
+      - b
+      - c
+    required: false
+  - name: input_with_underscores
+    type: any
+    description: A variable with underscores.
+    default: null
+    required: true
+  - name: input-with-pipe
+    type: string
+    description: It includes v1 | v2 | v3
+    default: v1
+    required: false
+  - name: input-with-code-block
+    type: list
+    description: "This is a complicated one. We need a newline.  \nAnd an example in a code block\n```\ndefault     = [\n  \"machine rack01:neptune\"\n]\n```\n"
+    default:
+      - name rack:location
+    required: false
+  - name: long_type
+    type: |-
+      object({
+          name = string,
+          foo  = object({ foo = string, bar = string }),
+          bar  = object({ foo = string, bar = string }),
+          fizz = list(string),
+          buzz = list(string)
+        })
+    description: |
+      This description is itself markdown.
 
-    It spans over multiple lines.
-  default:
-    bar:
-      bar: bar
-      foo: bar
-    buzz:
-    - fizz
-    - buzz
-    fizz: []
-    foo:
-      bar: foo
-      foo: foo
-    name: hello
-  required: false
-- name: no-escape-default-value
-  type: string
-  description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
-  default: VALUE_WITH_UNDERSCORE
-  required: false
-- name: with-url
-  type: string
-  description: The description contains url. https://www.domain.com/foo/bar_baz.html
-  default: ""
-  required: false
-- name: string_default_empty
-  type: string
-  description: null
-  default: ""
-  required: false
-- name: string_default_null
-  type: string
-  description: null
-  default: null
-  required: false
-- name: string_no_default
-  type: string
-  description: null
-  default: null
-  required: true
-- name: number_default_zero
-  type: number
-  description: null
-  default: 0
-  required: false
-- name: bool_default_false
-  type: bool
-  description: null
-  default: false
-  required: false
-- name: list_default_empty
-  type: list(string)
-  description: null
-  default: []
-  required: false
-- name: object_default_empty
-  type: object({})
-  description: null
-  default: {}
-  required: false
+      It spans over multiple lines.
+    default:
+      bar:
+        bar: bar
+        foo: bar
+      buzz:
+        - fizz
+        - buzz
+      fizz: []
+      foo:
+        bar: foo
+        foo: foo
+      name: hello
+    required: false
+  - name: no-escape-default-value
+    type: string
+    description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
+    default: VALUE_WITH_UNDERSCORE
+    required: false
+  - name: with-url
+    type: string
+    description: The description contains url. https://www.domain.com/foo/bar_baz.html
+    default: ""
+    required: false
+  - name: string_default_empty
+    type: string
+    description: null
+    default: ""
+    required: false
+  - name: string_default_null
+    type: string
+    description: null
+    default: null
+    required: false
+  - name: string_no_default
+    type: string
+    description: null
+    default: null
+    required: true
+  - name: number_default_zero
+    type: number
+    description: null
+    default: 0
+    required: false
+  - name: bool_default_false
+    type: bool
+    description: null
+    default: false
+    required: false
+  - name: list_default_empty
+    type: list(string)
+    description: null
+    default: []
+    required: false
+  - name: object_default_empty
+    type: object({})
+    description: null
+    default: {}
+    required: false
 outputs:
-- name: unquoted
-  description: It's unquoted output.
-- name: output-2
-  description: It's output number two.
-- name: output-1
-  description: It's output number one.
-- name: output-0.12
-  description: terraform 0.12 only
+  - name: unquoted
+    description: It's unquoted output.
+  - name: output-2
+    description: It's output number two.
+  - name: output-1
+    description: It's output number one.
+  - name: output-0.12
+    description: terraform 0.12 only
 providers:
-- name: tls
-  alias: null
-  version: null
-- name: aws
-  alias: null
-  version: '>= 2.15.0'
-- name: aws
-  alias: ident
-  version: '>= 2.15.0'
-- name: "null"
-  alias: null
-  version: null
+  - name: tls
+    alias: null
+    version: null
+  - name: aws
+    alias: null
+    version: '>= 2.15.0'
+  - name: aws
+    alias: ident
+    version: '>= 2.15.0'
+  - name: "null"
+    alias: null
+    version: null
 requirements:
-- name: terraform
-  version: '>= 0.12'
-- name: aws
-  version: '>= 2.15.0'
-- name: random
-  version: '>= 2.2.0'
\ No newline at end of file
+  - name: terraform
+    version: '>= 0.12'
+  - name: aws
+    version: '>= 2.15.0'
+  - name: random
+    version: '>= 2.2.0'
\ No newline at end of file
diff --git a/internal/types/string_test.go b/internal/types/string_test.go
index b7c11b0..72639b4 100644
--- a/internal/types/string_test.go
+++ b/internal/types/string_test.go
@@ -191,12 +191,12 @@ func TestStringMarshalYAML(t *testing.T) {
 		{
 			name:     "string marshal YAML",
 			value:    "foo",
-			expected: String("foo"),
+			expected: "foo",
 		},
 		{
 			name:     "string marshal YAML",
 			value:    "lorem ipsum",
-			expected: String("lorem ipsum"),
+			expected: "lorem ipsum",
 		},
 		{
 			name:     "string marshal YAML",
diff --git a/pkg/tfconf/output_test.go b/pkg/tfconf/output_test.go
index 499a5f0..9a3cacc 100644
--- a/pkg/tfconf/output_test.go
+++ b/pkg/tfconf/output_test.go
@@ -282,7 +282,7 @@ func TestOutputMarshalYAML(t *testing.T) {
 		{
 			name:     "output marshal JSON",
 			output:   outputs[1],
-			expected: "*tfconf.Output",
+			expected: "tfconf.Output",
 		},
 		{
 			name:     "output marshal JSON",
@@ -302,7 +302,7 @@ func TestOutputMarshalYAML(t *testing.T) {
 		{
 			name:     "output marshal JSON",
 			output:   outputs[5],
-			expected: "*tfconf.Output",
+			expected: "tfconf.Output",
 		},
 		{
 			name:     "output marshal JSON",