Files
terraform-docs/internal/format/testdata/markdown/document-WithRequired.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

411 lines
4.9 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
The following requirements are needed by this module:
- terraform (>= 0.12)
- aws (>= 2.15.0)
- random (>= 2.2.0)
## Providers
The following providers are used by this module:
- tls
- aws (>= 2.15.0)
- aws.ident (>= 2.15.0)
- null
## Modules
The following Modules are called:
### foo
Source: bar
Version: 1.2.3
### bar
Source: baz
Version: 4.5.6
### baz
Source: baz
Version: 4.5.6
## Resources
The following resources are used by this module:
- [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)
## Required Inputs
The following input variables are required:
### unquoted
Description: n/a
Type: `any`
### string-2
Description: It's string number two.
Type: `string`
### number-2
Description: It's number number two.
Type: `number`
### map-2
Description: It's map number two.
Type: `map`
### list-2
Description: It's list number two.
Type: `list`
### input_with_underscores
Description: A variable with underscores.
Type: `any`
### string_no_default
Description: n/a
Type: `string`
## Optional Inputs
The following input variables are optional (have default values):
### bool-3
Description: n/a
Type: `bool`
Default: `true`
### bool-2
Description: It's bool number two.
Type: `bool`
Default: `false`
### bool-1
Description: It's bool number one.
Type: `bool`
Default: `true`
### string-3
Description: n/a
Type: `string`
Default: `""`
### string-1
Description: It's string number one.
Type: `string`
Default: `"bar"`
### string-special-chars
Description: n/a
Type: `string`
Default: `"\\.<>[]{}_-"`
### number-3
Description: n/a
Type: `number`
Default: `"19"`
### number-4
Description: n/a
Type: `number`
Default: `15.75`
### number-1
Description: It's number number one.
Type: `number`
Default: `42`
### map-3
Description: n/a
Type: `map`
Default: `{}`
### map-1
Description: It's map number one.
Type: `map`
Default:
```json
{
"a": 1,
"b": 2,
"c": 3
}
```
### list-3
Description: n/a
Type: `list`
Default: `[]`
### list-1
Description: It's list number one.
Type: `list`
Default:
```json
[
"a",
"b",
"c"
]
```
### input-with-pipe
Description: It includes v1 | v2 | v3
Type: `string`
Default: `"v1"`
### input-with-code-block
Description: This is a complicated one. We need a newline.
And an example in a code block
```
default = [
"machine rack01:neptune"
]
```
Type: `list`
Default:
```json
[
"name rack:location"
]
```
### long_type
Description: This description is itself markdown.
It spans over multiple lines.
Type:
```hcl
object({
name = string,
foo = object({ foo = string, bar = string }),
bar = object({ foo = string, bar = string }),
fizz = list(string),
buzz = list(string)
})
```
Default:
```json
{
"bar": {
"bar": "bar",
"foo": "bar"
},
"buzz": [
"fizz",
"buzz"
],
"fizz": [],
"foo": {
"bar": "foo",
"foo": "foo"
},
"name": "hello"
}
```
### no-escape-default-value
Description: The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'.
Type: `string`
Default: `"VALUE_WITH_UNDERSCORE"`
### with-url
Description: The description contains url. https://www.domain.com/foo/bar_baz.html
Type: `string`
Default: `""`
### string_default_empty
Description: n/a
Type: `string`
Default: `""`
### string_default_null
Description: n/a
Type: `string`
Default: `null`
### number_default_zero
Description: n/a
Type: `number`
Default: `0`
### bool_default_false
Description: n/a
Type: `bool`
Default: `false`
### list_default_empty
Description: n/a
Type: `list(string)`
Default: `[]`
### object_default_empty
Description: n/a
Type: `object({})`
Default: `{}`
## Outputs
The following outputs are exported:
### unquoted
Description: It's unquoted output.
### output-2
Description: It's output number two.
### output-1
Description: It's output number one.
### output-0.12
Description: terraform 0.12 only