add example
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
build
|
build
|
||||||
queries
|
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
.env
|
.env
|
||||||
.DS_Store
|
.DS_Store
|
||||||
tmp
|
|
||||||
|
|||||||
35
example/example.hcl
Normal file
35
example/example.hcl
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
// comment
|
||||||
|
# comment
|
||||||
|
/*
|
||||||
|
comment
|
||||||
|
*/
|
||||||
|
|
||||||
|
resource_1 "strlit1" "strlit2" {
|
||||||
|
attr1 = "val1"
|
||||||
|
tupl1 = [ 1, 2, 3.4, "foo" ]
|
||||||
|
tupl2 = []
|
||||||
|
obj1 = { foo = "baz" }
|
||||||
|
null1 = null
|
||||||
|
bool1 = true
|
||||||
|
bool2 = false
|
||||||
|
splat1 = tuple.*.foo.bar[0]
|
||||||
|
splat2 = tuple[*].foo.bar[0]
|
||||||
|
for1 = { for i, v in ["a", "a", "b"] : v => i... }
|
||||||
|
for2 = [ for k, v in local.list : "${k}-${v}" ]
|
||||||
|
for3 = [ for k in local.list : k ]
|
||||||
|
for4 = { for i in local.list : i => i }
|
||||||
|
for5 = { for k, v in local.map : k => v }
|
||||||
|
for6 = [ for i in local.list : i if i < 3 ]
|
||||||
|
func1 = is_number("123")
|
||||||
|
cond1 = pred() ? 1 : "foobar"
|
||||||
|
esc1 = "\" \t \UFF11FF22 \uFFFF \n"
|
||||||
|
|
||||||
|
nested_resource_1 {
|
||||||
|
attr1 = 2
|
||||||
|
attr2 = 2.112
|
||||||
|
attr3 = 2.112e-12
|
||||||
|
attr4 = 2.112e+12
|
||||||
|
attr5 = 2.112E+12
|
||||||
|
attr6 = 2.112E-12
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user