Files
terraform-docs/internal/format/testdata/markdown/table-Base.golden
Khosrow Moossavi 7e489d2bbb Do not modify header lines and trailing whitespaces
This is going to preserve line-ending of extracted header text as they
are provided by users. In other words we are going to always assume the
header text is formatted in the "intended" way by users. So we're never
going to modify line-endings and won't append `<SPACE><SPACE>` at the
end of paragraph lines.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-13 13:43:03 -05:00

116 lines
4.2 KiB
Plaintext

Usage:
Example of 'foo_bar' module in `foo_bar.tf`.
- list item 1
- list item 2
Even inline **formatting** in _here_ is possible.
and some [link](https://domain.com/)
* list item 3
* list item 4
```hcl
module "foo_bar" {
source = "github.com/foo/bar"
id = "1234567890"
name = "baz"
zones = ["us-east-1", "us-west-1"]
tags = {
Name = "baz"
Created-By = "first.last@email.com"
Date-Created = "20180101"
}
}
```
Here is some trailing text after code block,
followed by another line of text.
| Name | Description |
|------|-----------------|
| Foo | Foo description |
| Bar | Bar description |
## Requirements
| Name | Version |
|------|---------|
| terraform | >= 0.12 |
| aws | >= 2.15.0 |
| random | >= 2.2.0 |
## Providers
| Name | Version |
|------|---------|
| tls | n/a |
| aws | >= 2.15.0 |
| aws.ident | >= 2.15.0 |
| null | n/a |
## Modules
| Name | Source | Version |
|------|--------|---------|
| foo | bar | 1.2.3 |
| bar | baz | 4.5.6 |
| baz | baz | 4.5.6 |
## Resources
| Name |
|------|
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) |
| [aws_caller_identity.ident](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) |
| [null_resource.foo](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) |
| [tls_private_key.baz](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) |
## Inputs
| Name | Description | Type | Default |
|------|-------------|------|---------|
| unquoted | n/a | `any` | n/a |
| bool-3 | n/a | `bool` | `true` |
| bool-2 | It's bool number two. | `bool` | `false` |
| bool-1 | It's bool number one. | `bool` | `true` |
| string-3 | n/a | `string` | `""` |
| string-2 | It's string number two. | `string` | n/a |
| string-1 | It's string number one. | `string` | `"bar"` |
| string-special-chars | n/a | `string` | `"\\.<>[]{}_-"` |
| number-3 | n/a | `number` | `"19"` |
| number-4 | n/a | `number` | `15.75` |
| number-2 | It's number number two. | `number` | n/a |
| number-1 | It's number number one. | `number` | `42` |
| map-3 | n/a | `map` | `{}` |
| map-2 | It's map number two. | `map` | n/a |
| map-1 | It's map number one. | `map` | <pre>{<br> "a": 1,<br> "b": 2,<br> "c": 3<br>}</pre> |
| list-3 | n/a | `list` | `[]` |
| list-2 | It's list number two. | `list` | n/a |
| list-1 | It's list number one. | `list` | <pre>[<br> "a",<br> "b",<br> "c"<br>]</pre> |
| input_with_underscores | A variable with underscores. | `any` | n/a |
| input-with-pipe | It includes v1 \| v2 \| v3 | `string` | `"v1"` |
| input-with-code-block | This is a complicated one. We need a newline.<br>And an example in a code block<pre>default = [<br> "machine rack01:neptune"<br>]</pre> | `list` | <pre>[<br> "name rack:location"<br>]</pre> |
| long_type | This description is itself markdown.<br><br>It spans over multiple lines. | <pre>object({<br> name = string,<br> foo = object({ foo = string, bar = string }),<br> bar = object({ foo = string, bar = string }),<br> fizz = list(string),<br> buzz = list(string)<br> })</pre> | <pre>{<br> "bar": {<br> "bar": "bar",<br> "foo": "bar"<br> },<br> "buzz": [<br> "fizz",<br> "buzz"<br> ],<br> "fizz": [],<br> "foo": {<br> "bar": "foo",<br> "foo": "foo"<br> },<br> "name": "hello"<br>}</pre> |
| no-escape-default-value | The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'. | `string` | `"VALUE_WITH_UNDERSCORE"` |
| with-url | The description contains url. https://www.domain.com/foo/bar_baz.html | `string` | `""` |
| string_default_empty | n/a | `string` | `""` |
| string_default_null | n/a | `string` | `null` |
| string_no_default | n/a | `string` | n/a |
| number_default_zero | n/a | `number` | `0` |
| bool_default_false | n/a | `bool` | `false` |
| list_default_empty | n/a | `list(string)` | `[]` |
| object_default_empty | n/a | `object({})` | `{}` |
## Outputs
| Name | Description |
|------|-------------|
| unquoted | It's unquoted output. |
| output-2 | It's output number two. |
| output-1 | It's output number one. |
| output-0.12 | terraform 0.12 only |