forked from terraform-docs/terraform-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
180 lines (149 loc) · 2.83 KB
/
Copy pathvariables.tf
File metadata and controls
180 lines (149 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
variable unquoted {}
variable "bool-3" {
default = true
}
variable "bool-2" {
description = "It's bool number two."
default = false
}
// It's bool number one.
variable "bool-1" {
default = true
}
variable "string-3" {
default = ""
}
variable "string-2" {
description = "It's string number two."
type = "string"
}
// It's string number one.
variable "string-1" {
default = "bar"
}
variable "number-3" {
type = number
default = "19"
}
variable "number-4" {
type = number
default = 15.75
}
variable "number-2" {
description = "It's number number two."
type = "number"
}
// It's number number one.
variable "number-1" {
default = 42
}
variable "map-3" {
default = {}
}
variable "map-2" {
description = "It's map number two."
type = "map"
}
// It's map number one.
variable "map-1" {
default = {
a = 1
b = 2
c = 3
}
type = "map"
}
variable "list-3" {
default = []
}
variable "list-2" {
description = "It's list number two."
type = "list"
}
// It's list number one.
variable "list-1" {
default = ["a", "b", "c"]
type = "list"
}
// A variable with underscores.
variable "input_with_underscores" {}
// A variable with pipe in the description
variable "input-with-pipe" {
description = "It includes v1 | v2 | v3"
default = "v1"
}
variable "input-with-code-block" {
description = <<EOD
This is a complicated one. We need a newline.
And an example in a code block
```
default = [
"machine rack01:neptune"
]
```
EOD
default = [
"name rack:location"
]
}
variable "long_type" {
type = object({
name = string,
foo = object({ foo = string, bar = string }),
bar = object({ foo = string, bar = string }),
fizz = list(string),
buzz = list(string)
})
default = {
name = "hello"
foo = {
foo = "foo"
bar = "foo"
}
bar = {
foo = "bar"
bar = "bar"
},
fizz = []
buzz = ["fizz", "buzz"]
}
description = <<EOF
This description is itself markdown.
It spans over multiple lines.
EOF
}
variable "no-escape-default-value" {
description = "The description contains `something_with_underscore`. Defaults to 'VALUE_WITH_UNDERSCORE'."
default = "VALUE_WITH_UNDERSCORE"
}
variable "with-url" {
description = "The description contains url. https://www.domain.com/foo/bar_baz.html"
default = ""
}
variable "string_default_empty" {
type = string
default = ""
}
variable "string_default_null" {
type = string
default = null
}
variable "string_no_default" {
type = string
}
variable "number_default_zero" {
type = number
default = 0
}
variable "bool_default_false" {
type = bool
default = false
}
variable "list_default_empty" {
type = list(string)
default = []
}
variable "object_default_empty" {
type = object({})
default = {}
}