Files
terraform-docs/internal/format/testdata/document/document-OutputValues.golden
Khosrow Moossavi 38e18970ed refactor: Introduce Format interface and expose to public pkg (#195)
* Introduce format interface and expose to public pkg

* fix issues after merge

* don't panic

* Rename TFString back to String
2020-02-19 14:07:10 -05:00

269 lines
3.1 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 |
## Providers
The following providers are used by this module:
- tls
- aws (>= 2.15.0)
- aws.ident (>= 2.15.0)
- null
## Inputs
The following input variables are supported:
### unquoted
Description: n/a
Type: `any`
Default: n/a
### string-3
Description: n/a
Type: `string`
Default: `""`
### string-2
Description: It's string number two.
Type: `string`
Default: n/a
### string-1
Description: It's string number one.
Type: `string`
Default: `"bar"`
### map-3
Description: n/a
Type: `map`
Default: `{}`
### map-2
Description: It's map number two.
Type: `map`
Default: n/a
### 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-2
Description: It's list number two.
Type: `list`
Default: n/a
### list-1
Description: It's list number one.
Type: `list`
Default:
```json
[
"a",
"b",
"c"
]
```
### input_with_underscores
Description: A variable with underscores.
Type: `any`
Default: n/a
### 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: `""`
## Outputs
The following outputs are exported:
### unquoted
Description: It's unquoted output.
Value: map["leon":"cat"]
### output-2
Description: It's output number two.
Value: ["jack" "lola"]
### output-1
Description: It's output number one.
Value: 1
### output-0.12
Description: terraform 0.12 only
Value: ""